Skip to content

feat: add CMS image optimizer - #95

Draft
glitchedmob wants to merge 2 commits into
methodconf-svelte/endpointsfrom
methodconf-svelte/images
Draft

glitchedmob wants to merge 2 commits into
methodconf-svelte/endpointsfrom
methodconf-svelte/images

Conversation

@glitchedmob

@glitchedmob glitchedmob commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Adds a narrow SvelteKit replacement for the Next image optimizer used by CMS media while keeping future CMS updates dynamic.

  • Adds /_image for trusted /cms-media/media/... images with Next-compatible width and quality validation, Sharp transforms, WebP negotiation, ETags, HEAD support, and bounded upstream fetches.
  • Adds CmsImage.svelte plus helper functions that emit the fixed-width 1x/2x srcset shape Next used.
  • Pins sharp to 0.35.4 to match the original Next app lock.
  • Extends unit and adapter-node smoke tests for optimizer output, URL validation, cache headers, conditional requests, slash redirects, and no-enlarge behavior.

@glitchedmob
glitchedmob added this pull request to stack #93 October 4, 2026 06:58
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