feat: add hero image processing and API for serving variants
- Introduced a new script `prepare-hero-variants.mjs` to generate responsive hero image variants in WebP format. - Added a fallback image `hero_fallback.png` for each variant. - Created an API endpoint `hero-images.get.js` to retrieve available hero image variants and their fallback images. - Implemented directory and file checks to ensure the existence of required images before serving.
This commit is contained in:
@@ -77,20 +77,6 @@ export default defineNuxtConfig({
|
||||
],
|
||||
link: [
|
||||
{ rel: 'canonical', href: 'https://www.harheimertc.de/' },
|
||||
{
|
||||
rel: 'preload',
|
||||
as: 'image',
|
||||
href: '/images/club_about_us_hero_960.webp',
|
||||
type: 'image/webp',
|
||||
media: '(max-width: 1024px)'
|
||||
},
|
||||
{
|
||||
rel: 'preload',
|
||||
as: 'image',
|
||||
href: '/images/club_about_us_hero_1600.webp',
|
||||
type: 'image/webp',
|
||||
media: '(min-width: 1025px)'
|
||||
},
|
||||
{ rel: 'preconnect', href: 'https://fonts.googleapis.com' },
|
||||
{ rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user