Optimize images only if they are heavy and ignore if not heavy

Created on 10 April 2024, 9 months ago

Problem/Motivation

I once used this module on a project. The content editors did have mixed sources of images they were adding on the site. Sometimes they took images from online which would already be optimized to sizes like 80kb - 150kb. Sometimes they sent to themselves via WhatsApp which automatically optimized down the images to sizes like same 80kb - 250kb. Sometimes they took directly from their cameras and phones which were heavy with sizes like 2mb -10mb. Some of the content editors could use Photoshop and some other tools to optimize their images before uploading while some others could not and so would upload very heavy images. So the site was a mix of optimized images and heavy ones.

I added Image Optimize reSmush.it on the site and after a while we noticed that the images they took online, the ones they took via WhatsApp and the ones that were optimized before being uploaded, were having poor quality on the site while the ones they took from their cameras and phones and didn't optimize before uploading, were showing in good quality on the site. I thought that the Image optimization was optimizing the images equally and so the ones that were already optimal were getting further optimized so their quality dropped too low to poor.

Proposed resolution

Have a configurable option for a content editor to set a size beyond which an image would be optimized and within which the image will not be optimized.

Feature request
Status

Active

Version

4.0

Component

Code

Created by

🇳🇬Nigeria chike Nigeria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024