Speed up your Magento 1 webshop. Optimize your JPEG and PNG images automatically with TinyPNG. https://tig.nl/tinypng-image-optimization-extensies/tinypng-image-optimization-community/
This is a useful extension but I feel the method of optimising images "on the fly" is inherently flawed because it interrupts the user request-response cycle. On a category page with 50 product images to optimise this means the user will have to wait a potentially very long time (multiple minutes) or, depending on server configuration, they will suffer a 503 server error as the request times out.
Can we fix this by (optionally) optimising the images using a cron job instead? I see the optimisation appears to be done via a helper method so perhaps some basic script that iterates every product and optimises the images in the background would be beneficial?
Has this been tackled before? I can't be the first person to recognise this issue!