Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Caching images fetched from API in the Svelte build folder using static adapter

$
0
0

I typically use 11ty as a static site generator, but I'm trying out Svelte for more interactivity on a site I'm developing now. I'm using Strapi as a CMS in a logic that I've used with 11ty before: fetching and caching Strapi's API calls (mainly images) in order to obtain, in the end, a static folder of the site with all the files with html links done correctly.

The idea is to use the CMS just to help me fill out the site (it's a portfolio site). I don't want to leave Strapi running all the time to display the images.

How could I do this with Svelte + Sveltekit?

I tried Svelte's static adapter (https://kit.svelte.dev/docs/adapter-static) but it doesn't seem to work in this case. The same happens with Svelte's Enhanced Image plugin (https://kit.svelte.dev/docs/images), as it only processes images that are in the project folder.

I'm wondering if there is a plugin or some workaround to handle this because I really want to use Svelte for this project.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>