Absolute paths restrictions for Storage Resize Image
See original GitHub issue[READ] Step 1: Are you in the right place?
Issues filed here should be about a feature request for a specific extension in this repository. To file a feature request that affects multiple extensions or the Firebase Extensions platform, please reach out to Firebase support directly.
[REQUIRED] Step 2: Extension name
This feature request is for extension: storage-resize-images
What feature would you like to see?
It would be great to have the possibility to define a list of absolute paths inside the bucket in which listen for new image uploads to be resized.
The absolute paths to be provided in the configuration option could be a comma-separated list, like this:
/users/avatars,/posts/pictures,/design/resources/icons
This will mean that any image uploaded inside these paths, or inside any folder at any depth inside these will be resized. And of course, any image outside of these paths will not be resized.
How would you use it?
This will allow us to limit the images to be resized by the extension. For instance, the user’s avatars could be resized, but what about if we don’t want resized images for posts pictures?
This feature could be very helpful to save much more space in the storage and not waste the resource of Firebase.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:5 (2 by maintainers)
Top GitHub Comments
Having an option to include a list of paths (otherwise all paths would be included if the list is empty) and an option to exclude paths would be very useful. This would give fine grain control.
Example:
Include:
/images
--> this would include/images
and all sub-folders Exclude:/images/do-not-resize
--> exclude this specific sub-folderAn even more robust solution would be to allow each include path listed to override the global size setting or have a separate way of handling this. One size doesn’t always fit all.
@yulioaj290 thanks for the PR!
@jhuleatt what do you think in terms of costs? Would this actually reduce costs for the users? Also, is this going to be backward compatible?