Skip to content

🐛 [storage-resize-images] Override sharp output parameters with customized image metadata #2080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TangrisJones opened this issue Apr 24, 2024 · 0 comments
Labels
extension: storage-resize-images Related to storage-resize-images extension triaged type: feature request New feature or request

Comments

@TangrisJones
Copy link

Extension name

This feature request is for extension: storage-resize-images

What feature would you like to see?

It would be super useful to be able to override certain config parameters on the fly via image metadata. For example, suppose we had some sort of structure like the following to override the "sharp output options" config in an image's metadata that is going to be resized

{
   resizeImageConfig: {
      sharpOutputOptions: {
         png: {
            quality: 50,
            compressionLevel: 9
         }
      }
   }
}

The extension could then override the global config levels according to this metadata on the fly, effectively customizing the compression on a per image basis.

How would you use it?

I would love this feature, because currently I have different kinds of images that I'm resizing. Some are fine for lossy compression, but one kind of image I can't use lossy compression on it, so I will have to just stick with lossless only. I'd love to apply this metadata to customize the compression for those images where lossy isint suitable (i.e. setting quality=100 when globally, quality=75). This will effectively override the "sharp output options" config option on an image-by-image basis, so that we are not stuck with one global config only.

Currently, the only way I know how to do something like this is to either install a second extension, or build it myself.

I think this feature could really help extend the extensions functionality. Would love to hear any thoughts on it!

@TangrisJones TangrisJones added the type: feature request New feature or request label Apr 24, 2024
@pr-Mais pr-Mais added the extension: storage-resize-images Related to storage-resize-images extension label May 27, 2024
@cabljac cabljac moved this from Needs Acknowledgment to Triaged in [Cloud] Extensions + Functions May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension: storage-resize-images Related to storage-resize-images extension triaged type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants