question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Reactions:13
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wdm954commented, Sep 19, 2020

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-folder

An 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.

1reaction
i14hcommented, Sep 14, 2020

@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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resize and optimise images on upload with ActiveStorage
This posts describes how to reduce the size of images uploaded with ActiveStorage significantly by combining a few optimisations.
Read more >
Image Resizing: Manually With CSS and Automatically With ...
Learn how to manually resize images and backgrounds with CSS3 and automatically ... Three resizing options are available: absolute resizing, ...
Read more >
Resize image and store into Storage in Laravel 7
Then to resize your image before uploading it, you can do like this: //$image is the temporary path of your image (/tmp/something) $image...
Read more >
How to resize an image in HTML? - ImageKit.io
There are a couple of downsides of client-side image resizing, mainly poor image quality and slower image rendering. To overcome this, you ...
Read more >
How to Resize and Serve Scaled Images with WordPress (2022)
Unlike cropping, which may ultimately alter the proportions of an image, scaling preserves the dimensions. If you're reading this post on a full...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found