# Improve page loading time - Image is LCP

**URL:** <https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412>\
**Category:** CMS Development\
**Created:** [January 20, 2023, 5:31pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412 "2023-01-20T17:31:48Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacjanowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jacjanowski/32/3192_2.png) [@jacjanowski](https://community.hubspot.com/u/jacjanowski)\
**Post date:** [January 20, 2023, 5:31pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/1 "2023-01-20T17:31:48Z")

</div>

So my LCP for each blog post is my header \<img\>, which is loaded with

`<img id="featured-image" fetchpriority="high" alt="{{content.featured_image_alt_text}}" src="{{ resize_image_url( content.featured_image,600 ) }}" width="570" height="358"/>`

I was sure to put ‘fetchpriority=“high”’ as recommended, as well as preloading my CSS file as shown below:

```lia-code-sample
 <!-- Load the stylesheet that will reference the LCP image. -->
 <link rel="stylesheet" href="{{ get_asset_url('/Heartland_November2018 Theme/Coded Files/Heartland_November2018-style.css') }}">

 <!-- Preload the LCP image with a high fetchpriority so it starts loading with the stylesheet. -->
 <link rel="preload" fetchpriority="high" as="image" href="{{content.featured_image}}" type="image/webp">

```

After doing the SEO scan, I still get the error that my picture is the LCP and I need to find a way to reduce the time for it to load.

 ![jacjanowski_0-1674235826467.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/8/8f498bc33d61c8ea80a725dc48cd5d2b8d5cfe62.png)

How am I supposed to fix this? I’ve read the articles that Hubspot recommends me, as well as countless of other artciles and can’t find a way to solve this. HELP PLEASE.

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [January 20, 2023, 7:11pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/2 "2023-01-20T19:11:24Z")

</div>

Hi @jacjanowski this is the [best article](https://web.dev/lcp/) I’ve found and refer to it every time I solve LCP issues.

You mentioned code related changes, have you already looked at [optimizing the image](https://web.dev/fast/#optimize-your-images) files directly?

---

<div class="post-metadata">

**Author:** ![jacjanowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jacjanowski/32/3192_2.png) [@jacjanowski](https://community.hubspot.com/u/jacjanowski)\
**Post date:** [January 20, 2023, 7:23pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/3 "2023-01-20T19:23:22Z")

</div>

So I converted my images into WebP, resized them to their appropriate dimensions so that they don’t have to resize on page load, and compressed them as much as possible. I don’t know what else to do besides that.

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [January 20, 2023, 7:36pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/4 "2023-01-20T19:36:12Z")

</div>

@jacjanowski I looked at PageSpeed Insights to see if there was any more detail.

I think the only other thing you could do to improve it would be to load it as a background image or move it out of the viewport so it’s not at the top of the page…

---

<div class="post-metadata">

**Author:** ![jacjanowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jacjanowski/32/3192_2.png) [@jacjanowski](https://community.hubspot.com/u/jacjanowski)\
**Post date:** [January 20, 2023, 7:58pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/5 "2023-01-20T19:58:14Z")

</div>

I’ll give this a shot. I will report back.

---

<div class="post-metadata">

**Author:** ![jacjanowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jacjanowski/32/3192_2.png) [@jacjanowski](https://community.hubspot.com/u/jacjanowski)\
**Post date:** [January 21, 2023, 12:22am UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/6 "2023-01-21T00:22:25Z")

</div>

So I gave it a try, and created a \<div\> that’s the same height and width as the dimensions of the image that’s rendered on the page. Here it is:

```lia-code-sample
 #featured-image {
 background-image: url({{ content.featured_image }});
 height: 358px;
 width: 570px;
 float: left;
 margin-right: 30px;
 }

//HTML code
<div id="featured-image" ></div>

```

This code is creating a \<div\> that has the background image of the blog’s featured image. The LCP remained the same as it was originally.

 ![jacjanowski_1-1674260282402.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/8/f8ad27c4b6690d1192887a0c4da42069753ce6f1.png)

I feel like this could be somewhat related as well, as it seems to be trying to use \<script\> tags that I turned off (or meant to).

 ![jacjanowski_2-1674260404754.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/1/81ab9f81fdee76027fe3055cf64eb1bf9340f0cc.png)

Lastly, this is what Google Lighthouse said; get scores on LCP and TBT, except these errors may have some signficance:

 ![jacjanowski_3-1674260481914.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/6/0634f7d9260a882305a32d220dfbed6b4a5487de.png)

Any further help would be greatly appreciated. Thanks ahaed of time!

---

<div class="post-metadata">

**Author:** ![MDevTeam3](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@MDevTeam3](https://community.hubspot.com/u/MDevTeam3)\
**Post date:** [June 6, 2024, 5:46pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/7 "2024-06-06T17:46:28Z")

</div>

Did you find any solution? If yes then please mention it here. I am facing the same issue

---

<div class="post-metadata">

**Author:** ![jacjanowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jacjanowski/32/3192_2.png) [@jacjanowski](https://community.hubspot.com/u/jacjanowski)\
**Post date:** [June 6, 2024, 6:12pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/8 "2024-06-06T18:12:41Z")

</div>

My SEO numbers have not changed from making the changes above, unfortunately. The best I was able to do was to have the code that I sent above in this chain and make sure to compress images as much as possible. This link was sent over to me which should be making a difference, but wasn’t in my case: [Optimizing The Image Element LCP — Smashing Magazine](https://www.smashingmagazine.com/2023/01/optimizing-image-element-lcp/)

Sorry I couldn’t help more.

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [June 9, 2024, 11:24pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/9 "2024-06-09T23:24:38Z")

</div>

@MDevTeam3 @jacjanowski one thing you might try is using [RumVisions real-time core web vitals and competitor tracking](https://www.rumvision.com/monitoring/google-core-web-vitals/), this will give you more insight into how much of an impact the LCP is actually having so you can determine if it’s worth pursuing a better score.

---

<div class="post-metadata">

**Author:** ![ellimccale](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@ellimccale](https://community.hubspot.com/u/ellimccale)\
**Post date:** [January 21, 2023, 1:18am UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/10 "2023-01-21T01:18:14Z")

</div>

Hi there! In addition to the article Jennifer linked (which is a fantastic resource), this one was just posted a few days ago with some additional tips:

> **[Optimizing The Image Element LCP — Smashing Magazine](https://www.smashingmagazine.com/2023/01/optimizing-image-element-lcp/)**
>
> Largest Contentful Paint (or LCP) is a major web performance KPI which is still a new concept for many web developers since it became a ranking factor just recently. In this article, Eloïse Martin provides an overview of the best practices for the...

Check out the tips for `srcset` and `fetchpriority`. 🙂

Regardless of any optimizations, the largest image within the current viewport is the most likely candidate for LCP. The best we can do is make sure it’s the right size and format for our users.

---

<div class="post-metadata">

**Author:** ![jnix284](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jnix284/32/29_2.png) [@jnix284](https://community.hubspot.com/u/jnix284)\
**Post date:** [January 22, 2023, 1:09pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/11 "2023-01-22T13:09:25Z")

</div>

Thanks for sharing @ellimccale this is a great article, I’ve saved it to my list! 🙂

---

<div class="post-metadata">

**Author:** ![jacjanowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jacjanowski/32/3192_2.png) [@jacjanowski](https://community.hubspot.com/u/jacjanowski)\
**Post date:** [January 22, 2023, 3:50pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/12 "2023-01-22T15:50:32Z")

</div>

Okay thanks for linking the articles. I have referenced the web.dev article a handful of times, but I’ll take a look into the other one that was linked. I work tomorrow, so I will update tomorrow with what I come across. Thanks again, I’ll be in touch.

---

<div class="post-metadata">

**Author:** ![jacjanowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jacjanowski/32/3192_2.png) [@jacjanowski](https://community.hubspot.com/u/jacjanowski)\
**Post date:** [January 22, 2023, 5:10pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/13 "2023-01-22T17:10:01Z")

</div>

Following up: I just went ahead and tried it out. I referenced that article that was sent over, but I’m not sure if I have it written in correctly. Here it is

```lia-code-sample
<img id="featured-image" fetchpriority="high" alt="{{content.featured_image_alt_text}}" src="{{ resize_image_url( content.featured_image ) }}" srcset="{{ resize_image_url(content.featured_image, 0, 0, 480) }} 480w, {{ resize_image_url(content.featured_image, 0, 0, 800) }} 800w"
 sizes="(max-width: 600px) 480px,
 800px" width="570" height="358"/>

```

![jacjanowski_0-1674405240601.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/f/2f4dc9dd54ea9a717af9b34781c3894042d05815.png)

The SEO hasn’t changed.

---

<div class="post-metadata">

**Author:** ![jacjanowski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jacjanowski/32/3192_2.png) [@jacjanowski](https://community.hubspot.com/u/jacjanowski)\
**Post date:** [January 24, 2023, 4:58pm UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/14 "2023-01-24T16:58:31Z")

</div>

Furthermore, I have this in the \<head\> as mentioned on the article that was linked:

```lia-code-sample
 <!-- Load the stylesheet that will reference the LCP image. -->
 <link rel="stylesheet" href="{{ get_asset_url('/Heartland_November2018 Theme/Coded Files/Heartland_November2018-style.css') }}" crossorigin>

 <!-- Preload the LCP image with a high fetchpriority so it starts loading with the stylesheet. -->
 <link rel="preload" fetchpriority="high" as="image" href="{{content.featured_image}}" type="image/webp" crossorigin>

```

With this, I got a warning in my console. I don’t think it’s set up correctly. It’s saying I set up my preload attribute, but it’s not being used.

![jacjanowski_0-1674579480454.png](https://d2qpr2jzcazej7.cloudfront.net/optimized/3X/2/0/20241fb17db33a463a0570a4e4e86a3d26f0d28b_2_690x66.png)

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 29, 2024, 6:01am UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/15 "2024-11-29T06:01:37Z")

</div>

Hi,

There is a new app available on hubspot app marketplace for speed optimization and improving LCP Score-

> **[HubSpot Marketplace](https://ecosystem.hubspot.com/marketplace/apps/website-speedy)**

You can try it for free for 14 days, it works instantly.

---

<div class="post-metadata">

**Author:** ![IMakkar](https://avatars.discourse-cdn.com/v4/letter/i/b38774/32.png) [@IMakkar](https://community.hubspot.com/u/IMakkar)\
**Post date:** [October 8, 2026, 7:45am UTC](https://community.hubspot.com/t/improve-page-loading-time-image-is-lcp/73412/16 "2026-10-08T07:45:01Z")

</div>

Hi, @jacjanowski

I think you’re actually pretty close here. The fact that the featured image is showing as the LCP element isn’t really the problem , the main thing is getting that image to load and render faster.

You’ve already covered fetch priority and preloading, so I’d check the actual LCP breakdown next. One thing I’d look at is whether the image you’re preloading is the same optimized/resized image that the page is actually displaying. If the browser preloads the original but the page ends up requesting a different version, you can still end up waiting for the actual LCP image.

After that, I’d look at the image itself. Since it’s being displayed around 570px wide, make sure you’re not sending a much larger image than needed and that it’s properly compressed as WebP /AVIF. If the image is already small but the download is still taking a while, then I’d look at the CDN/server response time.

So I wouldn’t try to get the image out of the LCP report. I’d first make sure the exact LCP image is being preloaded, then work on reducing its actual download time. That’s what should bring the LCP down.

You could also try Website Speedy for the image optimization side, especially if you have a lot of blog images.

Disclaimer: I’m affiliated with Website Speedy.

Note: I wrote this out and used AI to clean up the formatting.
