<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Syed Owais Ali</title>
    <description>The latest articles on DEV Community by Syed Owais Ali (@syed_owaisali_7898c42984).</description>
    <link>https://dev.to/syed_owaisali_7898c42984</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4259924%2Fd7298f70-5158-41f5-94eb-0e39d19cad77.png</url>
      <title>DEV Community: Syed Owais Ali</title>
      <link>https://dev.to/syed_owaisali_7898c42984</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/syed_owaisali_7898c42984"/>
    <language>en</language>
    <item>
      <title>WordPress LCP: the 5 fixes that actually move the number</title>
      <dc:creator>Syed Owais Ali</dc:creator>
      <pubDate>Mon, 23 Nov 2026 07:12:35 +0000</pubDate>
      <link>https://dev.to/syed_owaisali_7898c42984/wordpress-lcp-the-5-fixes-that-actually-move-the-number-3pmn</link>
      <guid>https://dev.to/syed_owaisali_7898c42984/wordpress-lcp-the-5-fixes-that-actually-move-the-number-3pmn</guid>
      <description>&lt;p&gt;Most WordPress performance advice is a list of twenty things. In practice, Largest Contentful Paint on a typical WordPress site is decided by about five of them — and the other fifteen are rounding errors you can chase for a week without changing the score.&lt;/p&gt;

&lt;p&gt;Here's the short version of where LCP actually goes, in the order that's usually worth fixing.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Your LCP element is probably the hero image — find out for sure first
&lt;/h2&gt;

&lt;p&gt;Before changing anything, confirm what the browser considers the LCP element. Open Chrome DevTools → Performance → record a load → look at the "LCP" marker in the Timings track. It'll point at the exact node.&lt;/p&gt;

&lt;p&gt;This matters because the fix is completely different depending on the answer. If LCP is a hero image, you optimize delivery. If it's a block of text, your problem is font loading. If it's a background image set in CSS, the browser can't even discover it until the stylesheet parses, which is its own category of slow.&lt;/p&gt;

&lt;p&gt;Skipping this step is the single most common reason people optimize for a week and see no change.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Preload the LCP image, and stop lazy-loading it
&lt;/h2&gt;

&lt;p&gt;WordPress adds &lt;code&gt;loading="lazy"&lt;/code&gt; to images by default. That's good for everything below the fold and actively harmful for the one image that &lt;em&gt;is&lt;/em&gt; your LCP element — you've told the browser to deprioritize the exact thing the metric measures.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// functions.php — skip lazy loading for the first content image&lt;/span&gt;
&lt;span class="nf"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'wp_img_tag_add_loading_attr'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="nv"&gt;$first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$context&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'the_content'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nv"&gt;$first&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nv"&gt;$first&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then preload it in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;as&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"image"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/hero.webp"&lt;/span&gt; &lt;span class="na"&gt;fetchpriority&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;fetchpriority="high"&lt;/code&gt; is doing real work here. It tells the browser this resource jumps the queue instead of competing with your stylesheets and scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Serve the image at the size you actually display
&lt;/h2&gt;

&lt;p&gt;This sounds obvious and it's still the biggest single win on most sites I look at. A 2400px-wide JPEG rendered into an 800px container is roughly 9x more pixels than needed, and on a mobile connection that's seconds, not milliseconds.&lt;/p&gt;

&lt;p&gt;Two things to get right:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Format.&lt;/strong&gt; WebP is well supported now; AVIF is smaller again if your tooling handles it. Either beats a JPEG.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Responsive sizes.&lt;/strong&gt; WordPress generates &lt;code&gt;srcset&lt;/code&gt; automatically, but the &lt;code&gt;sizes&lt;/code&gt; attribute it guesses is frequently wrong for custom themes. If &lt;code&gt;sizes&lt;/code&gt; says &lt;code&gt;100vw&lt;/code&gt; and your image sits in a 600px column, mobile browsers download the wrong candidate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Fix render-blocking CSS before you touch JavaScript
&lt;/h2&gt;

&lt;p&gt;Everyone reaches for JavaScript first because there's more of it. But JS loaded with &lt;code&gt;defer&lt;/code&gt; or &lt;code&gt;async&lt;/code&gt; doesn't block rendering, while every stylesheet in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; does — the browser won't paint until it has the CSS.&lt;/p&gt;

&lt;p&gt;On a typical WordPress install with a page builder you'll find a dozen stylesheets: theme, parent theme, three plugins, a font library, an icon set. Each one is a round trip before anything appears.&lt;/p&gt;

&lt;p&gt;What helps, in order of impact:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dequeue stylesheets on pages that don't use them. Your contact form's CSS doesn't need to load on the blog archive.&lt;/li&gt;
&lt;li&gt;Inline the critical above-the-fold CSS and load the rest asynchronously.&lt;/li&gt;
&lt;li&gt;Drop icon font libraries entirely. If you're using six icons, inline them as SVG and delete the 200KB font.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Self-host fonts, and preload the one you need
&lt;/h2&gt;

&lt;p&gt;Google Fonts via &lt;code&gt;fonts.googleapis.com&lt;/code&gt; costs you a DNS lookup, a TLS handshake, a CSS file, and &lt;em&gt;then&lt;/em&gt; the font file — a chain of requests that has to finish before your text renders.&lt;/p&gt;

&lt;p&gt;Self-host instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"preload"&lt;/span&gt; &lt;span class="na"&gt;as&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"font"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"font/woff2"&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/fonts/inter-var.woff2"&lt;/span&gt; &lt;span class="na"&gt;crossorigin&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pair it with &lt;code&gt;font-display: swap&lt;/code&gt; so text paints in a fallback immediately rather than sitting invisible. If your LCP element is text, this one change often moves the number more than everything else combined.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd skip
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minifying HTML.&lt;/strong&gt; Measurable in theory. Invisible in practice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Changing to a "faster" theme&lt;/strong&gt; before diagnosing. You often inherit a different set of the same problems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stacking caching plugins.&lt;/strong&gt; Two cache layers fighting each other is a support ticket, not an optimization.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chasing a 100 Lighthouse score.&lt;/strong&gt; Lighthouse runs a simulated throttle in a lab. Field data in Search Console's Core Web Vitals report is what Google actually uses.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The order that works
&lt;/h2&gt;

&lt;p&gt;Diagnose the LCP element → preload it with high priority → right-size and reformat it → cut render-blocking CSS → self-host fonts. Measure after each step, not at the end, so you know which change did what.&lt;/p&gt;

&lt;p&gt;Most sites get the majority of their improvement from the first three. The rest is cleanup.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm a co-founder at &lt;a href="https://velrixdigital.tech" rel="noopener noreferrer"&gt;Velrix Digital&lt;/a&gt;, where we build and optimize WordPress, Shopify and Next.js sites. Happy to answer questions in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>webperf</category>
      <category>webdev</category>
      <category>seo</category>
    </item>
  </channel>
</rss>
