I am currently attempting to deploy a basic Nuxt 3 blog page on CloudFlare Pages. To generate the files, I used npm run generate
as the build command. However, most of the images reset their width and height to 0 after loading. Upon viewing the source code, I noticed that the code contains width="auto"
and height="auto"
as intended, but it gets reset in the DOM later on. This issue occurs on most, but not all, of the images, so I'm confused as it happens only in production.
Here is a sample code:
<img
src="/pics/dashboard_click_to_start.png"
title="Click here to start button"
alt="Screenshot of Click here to start button"
class="mx-auto u-photo"
loading="lazy"
width="auto"
height="auto" />
</div>