Image Optimization
Optimize images on the IPFS gateway
Our IPFS gateway provides a list of options that you can use to optimize images stored on the IPFS network. Currently, we support optimization for the formats bmp, gif, jpg, png and webp. Here is how you can use those options:
GEThttps://:gateway.aiozpin.network/ipfs/:cid
Parameters
gateway* "premium" or "public"
cid* The cid of the image
Query
width The width to resize the image, 0 means original width (default 0)
height The height to resize the image, 0 means original height (default 0)
animated Whether to preserve animation of GIF images (default false)
quality The quality of the image (0-100), used only for JPG and WEBP (default 80)
dpr Device Pixel Ratio, a multiplier for width/height making it easier to specify higher-DPI sizes in (default 1)
fit The fit mode to resize the image, can be one of [ "scale-down", "contain", "cover", "crop", "pad" ] (default scale-down)
sharpen The strength of the sharpen filter, is a float from 0 to 10 (default 0)
width-gravity The horizontal gravity applied when cropping with fit mode cover (0 means left, 0.5 means center, 1 means right) (default 0.5)
height-gravity The vertical gravity applied when cropping with fit mode cover (0 means top, 0.5 means center, 1 means bottom) (default 0.5)
on-error Redirect to original source url if there is a fatal error in the optimization process, active if value is "redirect"
Response
200: OK