Preload LCP Image

描述

This plugin will add the ability to preload the largest contentful paint (LCP) Image on an individual page or post. This is designed to remove the “Preload the image used by the LCP element in order to improve your LCP time” warning that Google’s Pagespeed Insights sometimes serves.

For Support

I offer support in two places:-

On Github

This project is now on github, you can view the repository here. There are other versions, but this is the one I’ve put up, so where all the developmental will be tracked.

安装

  1. Upload the plugin to the /wp-content/plugins/ directory or use the Add New feature
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to any post and page and specify the LCP Image for that page.

Should you wish to use this plugin for custom post types, go to Settings > Preload LCP Image. By default it appears on posts and pages although you can set it to appear on any custom post type on this page.

For more guidance on how to determine the URL to use, please use my guide on how to determining the LCP image for a WordPress post

评价

2024 年 10 月 8 日
I’ve built custom post types with it’s own categories. Each category has it’s own featured image, is there any way I can use your plugin on these category images? The same would be relevant for blog post categories. …or is the idea that the “Default to Featured Image” option in settings cover the above? Thx.
2024 年 8 月 15 日 1 回复
We have just been testing this plugin and found that it can really give your website real-world performance improvements. Definitely worth keeping in your WordPress plugin arsenal 👍
2023 年 2 月 1 日 3 回复
Plugin working as described, really like that you added “fetchpriority high” I do have a suggestion for some future update though: I have a large site with nearly 1000 posts, would love if the plugin could automatically add Preload to post featured images, or possible by Class Name, in my instance that would be: class=”post-featured-image” This would save users with large sites from having to updated hundreds if not thousands of posts, Thanks for listening and good luck with Preload LCP Image, Good Plugin!
阅读所有2条评价

贡献者及开发者

“Preload LCP Image” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

将“Preload LCP Image”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

1.3.1

  • Tested with WordPress 6.7

1.3

  • Allow the user to fall back to “post thumbnail” if not specified.

1.2

  • Fixes a bug that causes a console error that ignores the “as” types due to unknown “as” or “type” values, or non-matching “media” attribute.
  • Improves the UX of the page in question

1.1

  • Allow the ability to specify different URLs for mobile or desktop viewpoints.

1.0.3

  • Tested with WordPress 6.4

1.0.2

  • Tested with WordPress 6.3

1.0.1

  • Tested with WordPress 6.2

1.0

  • First Public Release