Skip to content

compress unscaled when original is active#114

Open
tijmenbruggeman wants to merge 1 commit into
tinify:masterfrom
wcreateweb:compress-original-unscaled
Open

compress unscaled when original is active#114
tijmenbruggeman wants to merge 1 commit into
tinify:masterfrom
wcreateweb:compress-original-unscaled

Conversation

@tijmenbruggeman

@tijmenbruggeman tijmenbruggeman commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

WordPress scales down the original image when big_image_size_threshold is hit (defaults to 2560px). The scaled down version will be used when a user requests the full image and generates thumbnails using the unscaled version.

Users wanted to compress the unscaled original image as well as these might take up a lot of disk space.

Changes

  • src/class-tiny-image.php when original image exists, will also add a Tiny_Image_Size for the unscaled version;
  • get_active_tinify_sizes will return the unscaled size when original is enabled;
  • src/class-tiny-settings.php will preserve meta data on the unscaled version if enabled;

Considerations

  • When the original is enabled, it will now count as two compressions as the unscaled version will also account for one. I thought it was better to give an estimate to be on the safe side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant