Skip to content

Conversation

@tijmenbruggeman
Copy link
Collaborator

@tijmenbruggeman tijmenbruggeman commented Oct 24, 2025

The 'smallest' compression can be different for various sizes, sometimes in webp and higher resolution images would be in AVIF:
image

If AVIF is not supported, it would only show lowest resolution images to visitors. To prevent this, we will no longer have mixed formats in the sources. To prevent this from happening with existing convertions, we will only select a source if the largest resolution is part of the srcset.

Changes

  • Modified the signature to compress_file to only send the mimetypes to which it can convert to ($convert_to)
  • This $convert_to parameter is initially set by checking the settings. If the original image is already compressed, then it will use the converted mimetype of the original image.
  • parse width description to check if alternative sources have the largest width in their set.

@rkoopmans rkoopmans merged commit c6ad7ea into tinify:master Oct 27, 2025
9 checks passed
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.

2 participants