Skip to content

Commit

Permalink
rename hero image files to bust cache
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Abraham <[email protected]>
  • Loading branch information
cjyabraham committed Sep 30, 2024
1 parent 7b59bfb commit 4b80075
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
?>

<link rel="preload" as="image" fetchpriority="high"
href="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.webp' ); ?>">
href="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.webp' ); ?>">

<?php
wp_enqueue_script( 'home-hero', get_template_directory_uri() . '/source/js/on-demand/video.js', null, filemtime( get_template_directory() . '/source/js/on-demand/video.js' ), true );
Expand All @@ -21,8 +21,8 @@
<div aria-hidden="true" class="home-hero__overlay"></div>

<picture>
<source srcset="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.webp' ); ?>" type="image/webp">
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.jpg' ); ?>"
<source srcset="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.webp' ); ?>" type="image/webp">
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.jpg' ); ?>"
class="home-hero__poster" style="width: 100%; height: 100%;"
alt="Make cloud native ubiquitous" decoding="async">
</picture>
Expand All @@ -40,8 +40,8 @@ class="home-hero__poster" style="width: 100%; height: 100%;"
src="<?php echo esc_url( get_template_directory_uri() . '/source/videos/hero.mp4' ); ?>"
type="video/mp4">
<picture>
<source srcset="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.webp' ); ?>" type="image/webp">
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.jpg' ); ?>"
<source srcset="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.webp' ); ?>" type="image/webp">
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.jpg' ); ?>"
alt="Make cloud native ubiquitous">
</picture>
</video>
Expand Down
10 changes: 5 additions & 5 deletions web/wp-content/themes/cncf-twenty-two/components/home-hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
?>

<link rel="preload" as="image" fetchpriority="high"
href="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.webp' ); ?>">
href="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.webp' ); ?>">

<?php
wp_enqueue_script( 'home-hero', get_template_directory_uri() . '/source/js/on-demand/video.js', null, filemtime( get_template_directory() . '/source/js/on-demand/video.js' ), true );
Expand All @@ -21,8 +21,8 @@
<div aria-hidden="true" class="home-hero__overlay"></div>

<picture>
<source srcset="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.webp' ); ?>" type="image/webp">
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.jpg' ); ?>"
<source srcset="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.webp' ); ?>" type="image/webp">
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.jpg' ); ?>"
class="home-hero__poster" style="width: 100%; height: 100%;"
alt="Make cloud native ubiquitous" decoding="async">
</picture>
Expand All @@ -40,8 +40,8 @@ class="home-hero__poster" style="width: 100%; height: 100%;"
src="<?php echo esc_url( get_template_directory_uri() . '/source/videos/hero.mp4' ); ?>"
type="video/mp4">
<picture>
<source srcset="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.webp' ); ?>" type="image/webp">
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster.jpg' ); ?>"
<source srcset="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.webp' ); ?>" type="image/webp">
<img src="<?php echo esc_url( get_template_directory_uri() . '/images/home-hero-poster1.jpg' ); ?>"
alt="Make cloud native ubiquitous">
</picture>
</video>
Expand Down

0 comments on commit 4b80075

Please sign in to comment.