Skip to content

Conversation

gregives
Copy link
Contributor

The extension documentation says

This extension keeps the aspect ratio of uploaded images constant and shrinks the image until the resized image’s dimensions are at or under your specified max width and height.

However, it doesn't currently do that: this pull request fixes it.

Fixes #2106

@cabljac cabljac merged commit a422704 into firebase:next Feb 12, 2025
@cabljac
Copy link
Contributor

cabljac commented Feb 12, 2025

Thanks for your contribution, and your patience in getting this fixed! I will put out a new release with the fix soon.

@ralphferguson
Copy link

@cabljac & @gregives — do you think that this value could be configurable? I have essentially no experience with coding solutions for plugins like this (and the associated input field), but I'd be happy to look into it with some guidance, as I believe this would be a useful parameter to configure. What do you both think?

@gregives
Copy link
Contributor Author

Hi @ralphferguson, this option is actually configurable already, it is called "Sharp constructor options for resizing images" and it will override these default options

@ralphferguson
Copy link

Fantastic! Thanks, @gregives!

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.

🐛 [storage-resize-images] Extension crops the image with default settings.
3 participants