In order to achieve light web pages, it’s good to use images with indexed color profiles AND small pixel size. The problem is that the resize_image
function looses the color index of the original image, leading to an image heavier than the original. See this example:
Image 1 is 250x250 pixels
and weights 14.8 kB
Image 2 is produced with resize image
, is 160x160 pixels
and weights 27.4 kB
Image 3 is created using GIMP’s color index applied on image 2 and is 160x160 pixels
and weights 5.1 kB
We can see here that:
- the resized image is 1.8x heavier than the original despite having 2.4x less pixels
- we can produce a same-sized image 5.4x lighter using indexed color profiles
@keats, a quick fix in mind?
PS: for people who do not know indexed color profiles, see https://docs.gimp.org/en/gimp-image-convert-indexed.html