Skip to content

fix(vercel): added missing formats config & improved documentation#1514

Merged
danielroe merged 3 commits into
nuxt:mainfrom
mathix420:main
Sep 26, 2024
Merged

fix(vercel): added missing formats config & improved documentation#1514
danielroe merged 3 commits into
nuxt:mainfrom
mathix420:main

Conversation

@mathix420

@mathix420 mathix420 commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

🔗 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.

@danielroe danielroe left a comment

Copy link
Copy Markdown
Member

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
@github-actions github-actions Bot mentioned this pull request Sep 25, 2024
@benjaminrobinet

benjaminrobinet commented Sep 27, 2024

Copy link
Copy Markdown

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

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

@mathix420

Copy link
Copy Markdown
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