diff --git a/src/pages/app/[...appPath].astro b/src/pages/app/[...appPath].astro index 5201eb0..efa737e 100644 --- a/src/pages/app/[...appPath].astro +++ b/src/pages/app/[...appPath].astro @@ -5,7 +5,10 @@ import axios from 'axios' import { catchRedirectResponse } from '~/helpers/astro/request.js' -import { ListingDetails } from '~/helpers/listing-page.js' +import { + getVideoImages, + ListingDetails +} from '~/helpers/listing-page.js' import { getPathPartsFromAstroRequest } from '~/helpers/url.js' import Layout from '~/src/layouts/default.astro' @@ -59,13 +62,13 @@ const headOptions = listingDetails.headOptions if ( isBenchmarkPage ) { + const { preloads } = getVideoImages( listingDetails.initialVideo ) + // Preload video thumbnail - // - headOptions.link.push({ - 'rel': 'preload', - 'as': 'image', - 'href': `https://i.ytimg.com/vi_webp/${ listingDetails.initialVideo.id }/sddefault.webp` - }) + headOptions.link = [ + ...headOptions.link, + ...preloads + ] }