image icon indicating copy to clipboard operation
image copied to clipboard

feat(ipx): use alternate URL style with format as file extension

Open sgarner opened this issue 9 months ago โ€ข 0 comments

๐Ÿ”— Linked issue

Resolves #933, #584, #442

โ“ Type of change

  • [ ] ๐Ÿ“– Documentation (updates to the documentation or readme)
  • [x] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [x] ๐Ÿ‘Œ Enhancement (improving an existing functionality)
  • [ ] โœจ New feature (a non-breaking change that adds functionality)
  • [x] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • [x] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

Implements (and depends on) the alternate URL style for IPX proposed in https://github.com/unjs/ipx/pull/259

This improves prerendering of images so that the target format is respected in the generated filename, fixing issues with static hosting. For full rationale please see the description in https://github.com/unjs/ipx/pull/259

The original URL style will still be used when the requested format is auto (which is not applicable for prerendering anyway), or when no modifiers are given. Otherwise the new URL style will be used.

I'm not sure whether this needs to be classed as a breaking change. It will cause different URLs to be produced with ipx and ipxStatic providers, but that shouldn't break anything unless users are somehow relying on the old URL style.

sgarner avatar Apr 04 '25 05:04 sgarner