Fix IPX static generation issue when using multiple format options - #673
Fix IPX static generation issue when using multiple format options#673jimhlad wants to merge 1 commit into
Conversation
|
Thanks, this fixes my issue with not generating all my image sizes. Hope that it will be merged soon |
|
@pi0 For your review |
| background: 'b' | ||
| }, | ||
| joinWith: ',', | ||
| joinWith: '_', |
There was a problem hiding this comment.
I think this breaks placeholder generation for IPX as it generates the following URL when using the placeholder attribute:
/_ipx/q_50,s_10x10/images/slightly_smiling_face_3d.png
which is a valid IPX URL.
There was a problem hiding this comment.
That's possible. If there's a better solution feel free to close this out.
Note: In addition to fixing the described bug, this PR also made it so that the downloaded directory names don't have commas or ampersands in them. Not sure if there's a better way to accomplish this, but to me it feels a bit hacky to have these characters in folder names. Underscores or hyphens seem cleaner. Also not sure if there are any SEO implications to consider here.
|
This should be fixed by #725. Please ping me to reopen if not. Also thanks for PRs ❤️ |
This fixes an issue with the IPX provider when multiple formatting options are applied.
Modified playground sample data as a minimal reproduction.
To test:
playground/providers.tsshown here: https://github.com/nuxt/image/pull/673/files#diff-cdfcb4bb4c632950a1a834b483f874c9c3f5090efb60a1467e9e994403361276npm run dev:generateandnpx serve playground/.output/publicnpm run dev:generateandnpx serve playground/.output/public