You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm not a next.js expert so I hope you'll forgive any stupid things I will ask :)
Currently it uses next export to build the static website and it doesn't support the <img> HTML tag.
So I replaced it with the next.js Image API:
importSmallCardfrom'../components/SmallCard';import{projectIcons}from'../components/Icons';import{projects}from'../utils/projectsData';importImagefrom'next/image';constHome=()=>(<divclassName="home"><Imagesrc="/images/logo-transparent.png"alt="logo"width={250}height={118}/><h1>What Can I Deploy to Static Apps?</h1>
...
But the next export requires an Image optimizer service so I used a dummy one
importSmallCardfrom'../components/SmallCard';import{projectIcons}from'../components/Icons';import{projects}from'../utils/projectsData';importImagefrom'next/image';// opt-out of image optimization, no-opconstcustomLoader=({ src })=>{returnsrc;};constHome=()=>(<divclassName="home"><Imagesrc="/images/logo-transparent.png"alt="logo"width={250}height={118}loader={customLoader}/><h1>What Can I Deploy to Static Apps?</h1>
...
That works but that's a pretty bad workaround I guess.
Is there an Azure service or another way to support static local images ?
Thanks !
The text was updated successfully, but these errors were encountered:
Hello, I have found a workaround using Next's docs. Don't forget to set the right path in the next.config.js. I used the akamai and set it up my file like below:
Hi,
I'm not a next.js expert so I hope you'll forgive any stupid things I will ask :)
Currently it uses
next export
to build the static website and it doesn't support the<img>
HTML tag.So I replaced it with the next.js Image API:
But the
next export
requires an Image optimizer service so I used a dummy oneThat works but that's a pretty bad workaround I guess.
Is there an Azure service or another way to support static local images ?
Thanks !
The text was updated successfully, but these errors were encountered: