Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Reduce size of PNG files #12245

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

DimitriPapadopoulos
Copy link
Contributor

Subject: smaller PNG files

Feature or Bugfix

  • Refactoring

Purpose

  • Load faster, less network traffic.

Detail

  • Run optipng -o9 on screen captures in the Lumache tutorial.

Run `optipng -o9` on screen captures in the Lumache tutorial.
@chrisjsewell chrisjsewell changed the title Reduce size of PNG files [docs] Reduce size of PNG files Apr 10, 2024
@chrisjsewell
Copy link
Member

Thanks, out of interest, do you have a comparison of the before/after size?

@chrisjsewell chrisjsewell self-assigned this Apr 10, 2024
@picnixz
Copy link
Member

picnixz commented Apr 10, 2024

Thanks, out of interest, do you have a comparison of the before/after size?

GitHub is showing it if you go to files!

@DimitriPapadopoulos
Copy link
Contributor Author

Indeed, size is reduced to approximately 77 % of the original size (all files as a whole).

Note that optipng does lossless compression. Other software, such as pngquant, achieve even better compression, at the expense of lossy compression.

@picnixz
Copy link
Member

picnixz commented Apr 10, 2024

Just wondering but... why not just using JPG? (it may be ugly but it's lighter!)

@chrisjsewell
Copy link
Member

GitHub is showing it if you go to files!

Oh yeh oops I missed that 🤦

@DimitriPapadopoulos
Copy link
Contributor Author

Indeed, JPEG sounds like a better choice for lossy compression.

All images in the documentation are currently PNG files. Perhaps lossy compression and JPEG should be addressed in a different PR - starting with a discussion or issue.

@chrisjsewell
Copy link
Member

@picnixz I'm happy to merge this as is, since it is at least an iterative improvement?

@AA-Turner AA-Turner merged commit 6caf4ee into sphinx-doc:master Apr 11, 2024
7 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the optipng branch April 11, 2024 16:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2024
@AA-Turner AA-Turner added this to the 7.3.0 milestone Jul 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants