Optimize all the images included in the web

After a designer finishes creating the images for your website, there are a few things you can try before FTP uploading those images to their server.

You can review the GIFs and see if they are using a size palette corresponding to the number of colors in the image. With imagemagick it's easy using: identify -verbose image.gif

When you view an image that uses 4 colors and a 256 palette, it is ideal for enhancement.

Try converting GIFs to PNGs and see if they reduce their size. Many times this is not the case. Developers are often hesitant to use PNGs due to limited browser support, but that's a thing of the past. The only real issue is transparency-alpha in true-color PNGs, but still, GIFs are not true-color and do not support variable transparency either. So anything a GIF can do, a paletted PNG (PNG8) can too (except for animations). This simple imagemagick command is totally safe to use with PNGs: convert image.gif image.png

"What we're telling you is: Give PNGs a try!"

Run pngcrush (or any other PNG optimizer tool) on all your PNGs. For example: pngcrush image.png -rem alla -reduce -brute result.png

Run jpegtran on all your JPEGs. This tool performs operations with JPEGs without loss of quality, such as rotation, and it can also be used to optimize and remove comments and other useless information (such as EXIF ​​information) from your images. Jpegtran -copy none -optimize -perfect src.jpg dest.jpg

Date update on 2020-11-13. Date published on 2020-11-13. Category: Computer class Author: Oscar olg Fuente: tecnologia