Skip to content

Thumbs: Skip creating redundant files to save disk space #1874

@CaptnSeraph

Description

@CaptnSeraph

When setting static size limit to for example maximum, an original with size 1333x2000 results in thumbnails of that size being generated but labelled as 4096x4096_fit and 7680x4320_fit

This is resulting in redundant storage of full size images that should be served as full size images once the original image maximum resolution is reached in thumbnail size.

the thumbnail creation process should really be checking the original image maximum resolution and then only creating thumbnails below that resolution

even if this is to allow for thumbnails to be created of the same size as the original (or the next largest thumbnail size as appropriate) at a higher level of compression, there is no need to create thumbnails that are duplicated but still at the same size, as in my example, the 2560x1600_fit is 25% the disk size of the original image

205kb 2560x1600_fit (actual resolution 1066x1600)
876kb 1333x2000 original
834kb 4096x4096_fit (actual resolution 1333x2000)
834kb 7680x4320_fit (actual resolution 1333x2000)

it makes no sense to keep the two thumbnails in this instance (and probably any other instance where a jpg is being recompressed, it may be different for RAW images, but i doubt that going above original resolution more than once is warranted)

Metadata

Metadata

Assignees

Labels

enhancementEnhancement or improvement of an existing featureperformancePerformance OptimizationreleasedAvailable in the stable release

Type

No type

Projects

Status

Release 🌈

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions