Every time I refresh the page, I am faced with this strange resizing issue showcased in the GIF below:
https://i.sstatic.net/tzlYTUyf.gif
The image appears to be resized in an odd manner.
<WifiWidgetContainer>
<Image
src={`/assets/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="acdbc5cac5ec99d482dcc2cb">[email protected]</a>`}
alt="wifi_icon"
objectFit="contain"
fill
/>
</WifiWidgetContainer>
const WifiWidgetContainer = styled(Box)({
width: 20,
height: 20,
display: "flex",
alignItems: "center",
justifyContent: "center",
position: "relative",
});
I am looking for a solution where the Image does not resize visually upon reloading.
I attempted to remove objectFit="contain"
, which prevented the resizing but did not display the image correctly. How can I resolve this issue?