SvelteKit demo code for adding a NextGen background image to a site page with a JPEG or PNG fallback for older browsers.
See video explaining how add a WebP background image in SvelteKit. Drop any questions you have into a comment on that page.
If you're seeing this, you've probably already done this step. Congrats!
git clone https://github.com/rodneylab/sveltekit-nextgen-background.git my-new-mdsvex-blog
cd sveltekit-nextgen-background
pnpm install # or npm install
pnpm run dev
pnpm run build
You can preview the built app with
pnpm run preview
, regardless of whether you installed an adapter. This should not be used to serve your app in production.
Feel free to jump into the Rodney Lab matrix chat room.