resizeImage
filter works in a similar fashion to the imgTag filter, however it outputs the image url and not an entire <img>
tag. This is great for cases where you need a very custom <img>
tag, or you need a background image.resizeImage
filter together with an Image input, you need to reference the originalUrl
property. This is because the url
property will contain an already-resized URL based on the Image input options. With resizeImg
, we want the original image and do the resizing ourselves.width
- Overwrites the width provided in Image input options and uses this value for resizingheight
- Sets the height explicitly and resizes based on this, depending on fit
argument.dpr
- Overwrites the dpr provided in Image input options and uses this value for resizing.fit
- Affects interpretation of width and height. All resizing modes preserve aspect ratio. Read about the options here.background
- Sets a background color for the resulting image, used together with fit=pad
.