Content pfp
Content
@
0 reply
0 recast
0 reaction

alex pfp
alex
@alexgrover.eth
hey guys, have a question about the image optimization feature: we're (happily) using it to resize images on yoyo.meme, but it is unable to resize large gifs. We're okay with serving gifs at full size, but I'm not able to figure out how to get that working. I see the `img-onerror` param in the docs, but it's not working, at least via my usage. Example URL: https://yoyo.mypinata.cloud/ipfs/Qmbp9uUDQXkGDYhSqRHuCPZ25uPzK2uzbCqKNt3GdN8vhJ?img-width=1920&img-fit=scale-down&img-onerror=1 Any advice would be appreciated! Constructing these URLs via nextjs image optimization loader, so if you know of a clever way to avoid trying to resize gifs from within our app, that would work as well!
1 reply
3 recasts
8 reactions

Steve pfp
Steve
@stevedylandev.eth
Hey! 👋🏻 Sorry I don’t think we have it super clear in the docs. The correct query to add would be `?img-onerror=redirect` Just tested it on your link and it seems to work! `https://yoyo.mypinata.cloud/ipfs/Qmbp9uUDQXkGDYhSqRHuCPZ25uPzK2uzbCqKNt3GdN8vhJ?img-width=1920&img-fit=scale-down&img-onerror=redirect` Once we have the time I’m likely going to look into our own Next image component as a drop in replacement. I know in the meantime you can technically bypass optimizations with next/image, would need to find the docs for it
1 reply
0 recast
3 reactions