Skip to content

Fix for #180, where file format missing from src attr on <Img> component. - #182

Open
bnjmnrsh wants to merge 1 commit into
RafidMuhymin:mainfrom
bnjmnrsh:issue_180
Open

Fix for #180, where file format missing from src attr on <Img> component.#182
bnjmnrsh wants to merge 1 commit into
RafidMuhymin:mainfrom
bnjmnrsh:issue_180

Conversation

@bnjmnrsh

@bnjmnrsh bnjmnrsh commented Jul 5, 2024

Copy link
Copy Markdown

As described in #180, the <Img> component does not include a file format extension onto the file path of the src attribute. Browsers will render the image anyway as the correct path is included in the srcset attr. However, the current state is invalid, resulting in a 404 being thrown in both dev and prod.

While this PR works as intended and addresses the issue, it may be better to forward the format property to /api/renderImage.js and do the concatenation there, as this is where the rest of the data manipulation occurs. However, that PR would affect more than one file, so this is a minimal proof of concept.

@vercel

vercel Bot commented Jul 5, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
astro-imagetools-demo ❌ Failed (Inspect) Jul 5, 2024 10:50pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
astro-imagetools-docs ⬜️ Ignored (Inspect) Visit Preview Jul 5, 2024 10:50pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant