You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
Is your feature request related to a problem? Please describe.
Sapper only follows links in <a> elements.
Describe the solution you'd like
Sapper should crawl links in the src and srcset attributes in <img> and <source> tags and export them to disk if they refer to server routes.
Describe alternatives you've considered
Manually copying the related files to the static directory, but that is not feasible when using Sapper for a headless CMS.
How important is this feature to you?
I'm developing a prototype frontend for a headless CMS and this is a huge problem. My server routes load the images from the CMS and transform them using sharp (resizing, type conversion etc for responsive images). Without this feature I cannot use the automatic conversion and implement an unrelated build step for this.
Additional context
PR #938 already proses a partial solution but I have a PR in the available that adds support for srcset attributes.
The text was updated successfully, but these errors were encountered:
The bundler won’t handle dynamic paths. Nor can it process images coming from, say, imported .md files. Unless I’m missing something, without the crawler treating images (and other media) as first-class assets worth handling, a separate build phase is the only solution, and it’s a sad one indeed.
On the other hand, the joy of pointing your srcset to a server route and having everything built as part of the static export would be priceless.
Is your feature request related to a problem? Please describe.
Sapper only follows links in
<a>
elements.Describe the solution you'd like
Sapper should crawl links in the
src
andsrcset
attributes in<img>
and<source>
tags and export them to disk if they refer to server routes.Describe alternatives you've considered
Manually copying the related files to the static directory, but that is not feasible when using Sapper for a headless CMS.
How important is this feature to you?
I'm developing a prototype frontend for a headless CMS and this is a huge problem. My server routes load the images from the CMS and transform them using sharp (resizing, type conversion etc for responsive images). Without this feature I cannot use the automatic conversion and implement an unrelated build step for this.
Additional context
PR #938 already proses a partial solution but I have a PR in the available that adds support for srcset attributes.
The text was updated successfully, but these errors were encountered: