توضیحات
This plugin optimizes the loading of images which are the LCP (Largest Contentful Paint) element, including both img
elements and elements with CSS background images (where there is a style
attribute with an background-image
property). Different breakpoints in a theme’s responsive design may result in differing elements being the LCP element. Therefore, the LCP element for each breakpoint is captured so that high-fetchpriority preload links with media queries are added which prioritize loading the LCP image specific to the viewport of the visitor.
In addition to prioritizing the loading of the LCP image, this plugin also optimizes image loading by ensuring that loading=lazy
is omitted from any image that appears in the initial viewport for any of the breakpoints, which by default include:
- 0-320 (small smartphone)
- 321-480 (normal smartphone)
- 481-576 (phablets)
- >576 (desktop)
If an image does not appear in the initial viewport for any of these viewport groups, then loading=lazy
is added to the img
element.
👉 Note: This plugin optimizes pages for actual visitors, and it depends on visitors to optimize pages (since URL metrics need to be collected). As such, you won’t see optimizations applied immediately after activating the plugin. And since administrator users are not normal visitors typically, optimizations are not applied for admins by default.
There are currently no settings and no user interface for this plugin since it is designed to work without any configuration.
This plugin requires the Optimization Detective plugin as a dependency. Please refer to that plugin for additional background on how this plugin works as well as additional developer options.
نصب
Installation from within WordPress
- Visit Plugins > Add New.
- Search for Image Prioritizer.
- Install and activate the Image Prioritizer plugin.
Manual installation
- Upload the entire
image-prioritizer
folder to the/wp-content/plugins/
directory. - Visit Plugins.
- Activate the Image Prioritizer plugin.
سوالات متداول
-
Where can I submit my plugin feedback?
-
Feedback is encouraged and much appreciated, especially since this plugin may contain future WordPress core features. If you have suggestions or requests for new features, you can submit them as an issue in the WordPress Performance Team’s GitHub repository. If you need help with troubleshooting or have a question about the plugin, please create a new topic on our support forum.
-
Where can I report security bugs?
-
The Performance team and WordPress community take security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
To report a security issue, please visit the WordPress HackerOne program.
-
How can I contribute to the plugin?
-
Contributions are always welcome! Learn more about how to get involved in the Core Performance Team Handbook.
The plugin source code is located in the WordPress/performance repo on GitHub.
نقد و بررسیها
نقد و بررسیای برای این افزونه یافت نشد.
توسعه دهندگان و همکاران
“Image Prioritizer” نرم افزار متن باز است. افراد زیر در این افزونه مشارکت کردهاند.
مشارکت کنندگان“Image Prioritizer” به 5 زبان ترجمه شده است. با تشکر از مترجمین برای همکاری و کمکهایشان.
ترجمه “Image Prioritizer” به زبان شما.
علاقه مند به توسعه هستید؟
کد را مرور کنید, را بررسی کنید مخزن SVN, یا مشترک شوید گزارش توسعه توسط RSS.
گزارش تغییرات
0.1.4
Enhancements
- Move Auto Sizes logic from Enhanced Responsive Images to Image Prioritizer. (1476)
0.1.3
Bug Fixes
- Fix handling of image prioritization when only some viewport groups are populated. (1404)
0.1.2
- Update PHP logic to account for changes in Optimization Detective API. (1302)
0.1.1
- Fix background-image styled tag visitor’s handling of parsing style without background-image. (1288)
0.1.0
- Initial release.