THIS IS A BASIC CODE ADD UR THUMBNAIL IMAGE BASIC CODE
<link as="image" href="https://insightssolver.blogspot.com/2024/01/image_400.webp" imagesrcset="https://insightssolver.blogspot.com/2024/01/image_400.webp 400w, https://insightssolver.blogspot.com/2024/01/image_800px.webp 800w" rel="preload">
and
<!-- Image Address --> <p>Image Address: <a href="https://site1.com/image_400.webp">https://site1.com/image_400.webp</a></p> <!-- Image Name --> <p>Image Name: Image_400.webp</p> <!-- Preload Link --> <link as="image" href="https://site1.com/image_400.webp" imagesrcset="https://site1.com/image_400.webp 400w, https://site1.com/image_800px.webp 800w" rel="preload">
ADD THIS CODE BELOW THE <head>
<link as='image' href='https://insightssolver.blogspot.com/2024/01/image_400.webp' imagesrcset='https://insightssolver.blogspot.com/2024/01/image_400.webp 400w, https://insightssolver.blogspot.com/2024/01/image_800px.webp 800w' rel='preload'> </link></head>
search script post-share-buttons-bottom BELOW .post-outer
}
.post-share-buttons-bottom{
float:left
.post-outer .snippet-thumbnail {
/* Other existing properties */
margin-left: 39px; /* Reduce margin-left to optimize LCP */
/* Other existing properties */
}
view will be like this👇
.post-outer .snippet-thumbnail {
margin-top: 20px; /* Top margin set to 20px */
margin-right: 15px; /* Right margin set to 15px */
margin-bottom: 20px; /* Bottom margin set to 20px */
margin-left: 15px; /* Left margin set to 15px */
}
.post-outer .snippet-thumbnail{
-webkit-box-align:center;
-webkit-align-items:center;
-ms-flex-align:center;
align-items:center;
background:#000;
display:-webkit-box;
display:-webkit-flex;
display:-ms-flexbox;
display:flex;
-webkit-box-flex:0;
-webkit-flex:0 0 auto;
-ms-flex:0 0 auto;
flex:0 0 auto;
height:256px;
-webkit-box-pack:center;
-webkit-justify-content:center;
-ms-flex-pack:center;
justify-content:center;
margin-$endSide:136px;
overflow:hidden;
-webkit-box-ordinal-group:3;
-webkit-order:2;
-ms-flex-order:2;
order:2;
position:relative;
width:256px
}
LAZY LOAD INTRESECTING PRELOAD LINK NO 1 USE THIS CODE PASTE IT ABOVE THE </BODY>
<!DOCTYPE html>
<html>
<head>
<title>Lazy Loading Example</title>
</head>
<body>
<img src="image-to-preload.jpg" loading="lazy" alt="Preloaded Image">
<img src="another-image-to-preload.jpg" loading="lazy" alt="Another Preloaded Image">
<script>
document.addEventListener("DOMContentLoaded", function() {
let lazyImages = document.querySelectorAll('img[data-src]');
let options = {
root: null,
rootMargin: '0px',
threshold: 0.1
};
let lazyLoad = function(entries, observer) {
entries.forEach(entry => {
if (entry.isIntersecting) {
let img = entry.target;
if (img.getAttribute('loading') !== 'lazy') {
img.src = img.dataset.src;
}
observer.unobserve(img);
}
});
};
let observer = new IntersectionObserver(lazyLoad, options);
lazyImages.forEach(image => observer.observe(image));
});
</script>
</body>
</html>
Result for upper work in google speed 89
Phase | % of LCP | Timing |
|---|---|---|
TTFB | 45% | 1,360 ms |
Load Delay | 0% | 0 ms |
Load Time | 0% | 0 ms |
Render Delay | 55% | 1,660 ms |
YOU WILL GET THIS CODE IN YOUR THEME<b:includable id='userProfileText'>
<dd class='profile-textblock profile-snippet snippet-container r-snippet-container'>
<div class='snippet-item r-snippetized'>
<data:aboutme/>
</div>
<div class='snippet-fade r-snippet-fade hidden'/>
<!-- Async loading of scripts -->
<script async src="your-script.js"></script>
<!-- Preload rule for resources -->
<link rel="preload" href="your-resource.css" as="style" />
</dd>
</b:includable>
<b:includable id='userLocation'>
<dd class='profile-data profile-location'><data:location/></dd>
</b:includable>
</b:defaultmarkup>
</b:defaultmarkups>
ADD THIS DOWN 👇CODE JUST BELOW THE UPPER☝ CODE
<!-- Async loading of scripts -->
<script async src="your-script.js"></script>
<!-- Preload rule for resources -->
<link rel="preload" href="your-resource.css" as="style" />
<p>This is a simple HTML code</p>
<p>This is a simple HTML code</p>
<p>This is a simple HTML code</p>
<p>This is a simple HTML code</p>
<p>This is a simple HTML code</p>
<p>This is a simple HTML code</p>
https://ezgif.com/view-metadata/ezgif-5-68fad0e785.webp
<link rel="preload" as="image" href="https://insightssolver.blogspot.com/2024/01/image_400.webp" imagesrcset="https://insightssolver.blogspot.com/2024/01/image_400.webp 400w, https://insightssolver.blogspot.com/2024/01/image_800px.webp 800w">
ye responsive ke liye hai
<img src="https://insightssolver.blogspot.com/2024/01/image_400.webp" srcset="https://insightssolver.blogspot.com/2024/01/image_400.webp 400w, https://insightssolver.blogspot.com/2024/01/image_800px.webp 800w" alt="Image description">
Comments
Post a Comment