

Additional setupīefore installing this extension, make sure that you've set up a Cloud Storage bucket in your Firebase project. The final resized image will be 75px wide by 100px high to maintain the aspect ratio while also being at or under both of your maximum specified dimensions. You upload an image that is 480px wide by 640px high, which means a 0.75 aspect ratio. 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.įor example, say that you specify a max width of 200px and a max height of 100px. To configure this extension, you specify a maximum width and a maximum height (in pixels, px). Note that you can optionally configure the extension to overwrite the Cache-Control value for the resized image(s).

The extension automatically copies the following metadata, if present, from the original image to the resized image(s): Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Type, and user-provided metadata (a new Firebase storage download token will be generated on the resized image(s) if the original metadata contains a token). For example, you might want images that are 200x200, 400x400, and 680圆80 - this extension can create these three resized images then store them in your bucket.

You can even configure the extension to create resized images of different dimensions for each original image upload.
Names the resized image using the same name as the original uploaded image, but suffixed with your specified width and height.Creates a resized image with your specified dimensions.When you upload an image file to your specified Cloud Storage bucket, this extension: Here is an example: !(video.Use this extension to create resized versions of an image uploaded to a Cloud Storage bucket. These options, added in-line with the file name, give you the ability to determine an embedded video's autoplay, controls, and loop settings. In-line video control options are another capability baked into Grav. Your images, in essence, have a set of data unique to them that can be easily referenced and pulled as needed. You can use this method for a number of things, including creating a gallery with multiple unique data points you want to have referenced for each image. This will pull up the example phrase My Alt Text instead of the image.
