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(vercel): added missing formats config & improved documentation #1514

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

mathix420
Copy link
Contributor

@mathix420 mathix420 commented Sep 26, 2024

πŸ”— Linked issue

Fix #1490
Fix #1455
Fix #1107
Closes #1181

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

  • Added the missing formats in nitro Vercel config & updated docs to avoid missing the fact that every custom sizes need to be specified using Vercel image optimizer.
  • Without formats, Vercel does not resize images.

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❀️

@danielroe danielroe merged commit 543ddd6 into nuxt:main Sep 26, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Sep 25, 2024
@benjaminrobinet
Copy link

benjaminrobinet commented Sep 27, 2024

I would suggest to switch between webp and avif. Otherwise Vercel will always respond with webp.

formats: ["image/avif", "image/webp"]

@mathix420
Copy link
Contributor Author

@benjaminrobinet where did you find this information? It seems to work fine for me using ["image/webp", "image/avif"] ex: mathix.dev

https://mathix.dev/_vercel/image?url=%2Fimages%2Fftwa%2F1.png&w=320&q=100

image

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.

Width issue on vercel [Vercel] Image Sizing Broken Wrong behaviour of vercel provider
3 participants