Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bnjmnrsh
Copy link

@bnjmnrsh bnjmnrsh commented Jul 5, 2024

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.

Copy link

vercel bot commented Jul 5, 2024

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