benmneb / mui-image

⚛ React component to display images as per the Material Design guidelines. For apps using Material-UI v5.
https://mui-image.surge.sh
ISC License
50 stars 14 forks source link

`opacity` value stays as 0 in light mode on production build (works find in dev) Gatsby / MUI based project #24

Open kirill-develops opened 1 year ago

kirill-develops commented 1 year ago

I have a Gatsby / MUI-based project running here that for some reason in light mode doesn't change the opacity:0 to opacity:1. It does work correctly in dark mode. The repo can be found here

I'm using mui-image and my component looks like this:


<Image
    src={data?.flags?.svg}
    alt={`${data?.name?.common} flag`}
    sx={{ aspectRatio: '7/4' }}
    loading="lazy"
    fit="cover"
/>
narviii commented 1 year ago

Same issue with next.js/MUI. If i change code and save(no page reload) it works fine, if I reload - opacity is zero.