Open alextea opened 7 years ago
Would love to see improvements in this area. I feel like automated tests might be a good start - enough to prod someone to check the image and spend a bit of time optimising them.
the link above makes it part of the asset pipeline, and bar it doing the wrong thing, it's configure and forget
A couple of issues I can see with using the asset_pipeline is that it will be recompressing images, and if it's using lossy compression this could be bad. If the images aren't the right size or are too large it might not be as efficient.
it would be relatively simple to hook into it only when needed i reckon as well, using the base ruby library if we wished more fine grained control.
https://github.com/toy/image_optim
the one linked above is just the fire and forget option, i have used it with good success on previous projects.
Often when homepage promo images are added or changed they are bigger than necessary and this causes performance to suffer.
We should improve the workflow to ensure that developers updating the images are aware of the constraints and images are appropriately resized and compressed.
Some ideas on how to achieve this:
Some things to consider: