Commit 3e0973c8 authored by Simonas's avatar Simonas

Lazy loading images & feedback webp

parent b3aeff03
...@@ -127,7 +127,12 @@ class Biuro_Feedbacks extends WP_Widget { ...@@ -127,7 +127,12 @@ class Biuro_Feedbacks extends WP_Widget {
echo '<div class="c-feedbacks--section-inner">'; echo '<div class="c-feedbacks--section-inner">';
if ( ${'img' . $i} != "" ) { if ( ${'img' . $i} != "" ) {
echo '<img src="/wp-content/themes/biuro/i/feedbacks/' . ${'img' . $i} . '" class="c-feedbacks--img" width="85px" height="83px" alt="' . ${'name' . $i} . '"/>'; $img = preg_replace('/\.png$/i', '', ${'img' . $i});
echo '<picture class="c-feedbacks--img">';
echo '<source srcset="/wp-content/themes/biuro/i/feedbacks/' . $img . '.webp" type="image/webp">';
echo '<img loading="lazy" src="/wp-content/themes/biuro/i/feedbacks/' . $img . '.png" width="85px" height="83px" alt="Švyturys - Utenos alus" class="' . ${'name' . $i} . '">';
echo '</picture>';
} }
if ( ${'feedback' . $i} != "" ) { if ( ${'feedback' . $i} != "" ) {
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<div class="c-contact-landing-1--img"> <div class="c-contact-landing-1--img">
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95"> <img loading="lazy" src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95">
</picture> </picture>
</div> </div>
</div> </div>
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="c-contact-landing-2--img"> <div class="c-contact-landing-2--img">
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95"> <img loading="lazy" src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95">
</picture> </picture>
</div> </div>
</div> </div>
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<?php <?php
endif; endif;
?> ?>
<script src="/wp-content/themes/biuro/js/main.min.js" async></script> <script src="/wp-content/themes/biuro/js/main-876e541f.min.js" async></script>
<?php <?php
// global $time_start; // global $time_start;
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<div class="c-contact--img"> <div class="c-contact--img">
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95"> <img loading="lazy" src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95">
</picture> </picture>
</div> </div>
</div> </div>
......
...@@ -31,16 +31,19 @@ ...@@ -31,16 +31,19 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" >
<style><?php include 'css/core.min.css'; ?></style> <style><?php include 'css/core-96be3f17bc.min.css'; ?></style>
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" >
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main-1a30808647.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://www.gstatic.com">
<noscript> <noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css"> <link rel="stylesheet" href="/wp-content/themes/biuro/css/main-1a30808647.min.css">
</noscript> </noscript>
<?php wp_head(); ?> <?php wp_head(); ?>
......
...@@ -31,15 +31,18 @@ ...@@ -31,15 +31,18 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" >
<style><?php include 'css/core.min.css'; ?></style> <style><?php include 'css/core-96be3f17bc.min.css'; ?></style>
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" >
<link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main-1a30808647.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://www.gstatic.com">
<noscript> <noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css"> <link rel="stylesheet" href="/wp-content/themes/biuro/css/main-1a30808647.min.css">
</noscript> </noscript>
<?php wp_head(); ?> <?php wp_head(); ?>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="c-contact-landing-1--img"> <div class="c-contact-landing-1--img">
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95"> <img loading="lazy" src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95">
</picture> </picture>
</div> </div>
</div> </div>
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<div class="c-contact--img"> <div class="c-contact--img">
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/contact.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95"> <img loading="lazy" src="/wp-content/themes/biuro/i/contact.png" alt="" width="328" height="95">
</picture> </picture>
</div> </div>
</div> </div>
......
...@@ -9,59 +9,53 @@ ...@@ -9,59 +9,53 @@
<?php if ($blogID == 1): ?> <?php if ($blogID == 1): ?>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/svyturys.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/svyturys.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/svyturys.png" width="109" height="33" alt="Švyturys - Utenos alus" class="c-trust--img-svyturys"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/svyturys.png" width="109" height="33" alt="Švyturys - Utenos alus" class="c-trust--img-svyturys">
</picture> </picture>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/dpd.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/dpd.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/dpd.png" width="64" height="29" alt="DPD" class="c-trust--img-dpd"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/dpd.png" width="64" height="29" alt="DPD" class="c-trust--img-dpd">
</picture> </picture>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/pergale.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/pergale.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/pergale.png" width="85" height="19" alt="Vilniaus pergalė" class="c-trust--img-pergale"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/pergale.png" width="85" height="19" alt="Vilniaus pergalė" class="c-trust--img-pergale">
</picture> </picture>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/maxima.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/maxima.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/maxima.png" width="96" height="22" alt="Maxima" class="c-trust--img-maxima"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/maxima.png" width="96" height="22" alt="Maxima" class="c-trust--img-maxima">
</picture> </picture>
<?php elseif ($blogID == 2): ?> <?php elseif ($blogID == 2): ?>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/lv/pasts.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/lv/pasts.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/lv/pasts.png" width="122" height="28" alt="Latvijas pasts" class="c-trust--img-pasts"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/lv/pasts.png" width="122" height="28" alt="Latvijas pasts" class="c-trust--img-pasts">
</picture> </picture>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/lv/dhl.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/lv/dhl.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/lv/dhl.png" width="130" height="18" alt="DHL" class="c-trust--img-dhl"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/lv/dhl.png" width="130" height="18" alt="DHL" class="c-trust--img-dhl">
</picture> </picture>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/lv/staburadze.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/lv/staburadze.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/lv/staburadze.png" width="128" height="38" alt="Staburadze" class="c-trust--img-staburadze"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/lv/staburadze.png" width="128" height="38" alt="Staburadze" class="c-trust--img-staburadze">
</picture> </picture>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/lv/cido.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/lv/cido.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/lv/cido.png" width="73" height="47" alt="CIDO" class="c-trust--img-cido"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/lv/cido.png" width="73" height="47" alt="CIDO" class="c-trust--img-cido">
</picture> </picture>
<?php elseif ($blogID == 3): ?> <?php elseif ($blogID == 3): ?>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/ee/itella.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/ee/itella.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/ee/itella.png" width="86" height="54" alt="Itella" class="c-trust--img-itella"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/ee/itella.png" width="86" height="54" alt="Itella" class="c-trust--img-itella">
</picture> </picture>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/ee/saku.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/ee/saku.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/ee/saku.png" width="80" height="59" alt="Saku" class="c-trust--img-saku"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/ee/saku.png" width="80" height="59" alt="Saku" class="c-trust--img-saku">
</picture> </picture>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/ee/ipa.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/ee/ipa.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/ee/ipa.png" width="70" height="31" alt="Leibur" class="c-trust--img-ipa"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/ee/ipa.png" width="70" height="31" alt="Leibur" class="c-trust--img-ipa">
</picture> </picture>
<?php /*
<picture>
<source srcset="/wp-content/themes/biuro/i/trust/ee/leibur.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/ee/leibur.png" width="72" height="60" alt="Leibur" class="c-trust--img-leibur">
</picture>
*/ ?>
<picture> <picture>
<source srcset="/wp-content/themes/biuro/i/trust/ee/maxima.webp" type="image/webp"> <source srcset="/wp-content/themes/biuro/i/trust/ee/maxima.webp" type="image/webp">
<img src="/wp-content/themes/biuro/i/trust/ee/maxima.png" width="123" height="26" alt="MAXIMA" class="c-trust--img-maxima-ee"> <img loading="lazy" src="/wp-content/themes/biuro/i/trust/ee/maxima.png" width="123" height="26" alt="MAXIMA" class="c-trust--img-maxima-ee">
</picture> </picture>
<?php endif; ?> <?php endif; ?>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment