Comments (5)
What is the related DB data entry for this case looks like?
from wp-rocket.
Reproduce the problem ✅
I was able to reproduce the problem with the steps below:
- install/activate 3.16 + activate lazyload feature
- page template with image in the root directory without a forward slash(
<img src="image.jpg" alt="image" />
) - visit the page template
- clear cache and revisit the page
- Check the markup, you'll still find lazyload applied:
<img src="image.jpg" data-lazy-src="image.jpg" data-ll-status="loaded" class="entered lazyloaded">
When you log the entries of excluded patterns with the filter -rocket_lazyload_excluded_src
You'll get:
Array
(
[0] => /wpcf7_captcha/
[1] => timthumb.php?src
[2] => woocommerce/assets/images/placeholder.png
[3] => /id/10/2500/1667.jpg
[4] => /image.jpg
)
Identify the root cause ✅
The reason for this behaviour is because wp_parse_url
returns a path with a forward slash like so - /image.jpg
here:
With that there would be a mismatch when matching
/image.jpg
with image.jpg
to exclude.
Scope a solution ✅
We can ltrim
the forward slash off the returned paths here:
Estimate the effort ✅
[XS]
from wp-rocket.
@jeawhanlee Have you performed basic checks to ensure the code does not break on happy path and that the reported failing cases are fixed? In which case, we can merge so that we only have to work on the feature branch. OK? Thanks 🙏
from wp-rocket.
Related Issues (20)
- 3.16 enhancement - Images intersecting the viewport should be considered as LCP candidates HOT 9
- WP_CACHE defined multiple times in wp-config.php when WP Compress - Image Optimizer is activated HOT 1
- LCP element + facaded iframe HOT 4
- Preload the picture markup HOT 1
- Preload the responsive image markup HOT 3
- Preload the single background images markup HOT 2
- Inconsistency between Clear used CSS / Critical Images vs. Clean […] buttons HOT 2
- Preload the layered background images markup HOT 2
- Preload the image-set background images HOT 4
- ATF isnot detected for background images in certain cases (with attribute markup, inline, multi markup) HOT 12
- Update Container dependency to v4
- Optimize loading of plugins compatibility classes
- Incorporate PHPStan for Static Analysis
- 3.16 improvement - Make the beacon script output ready-to-store in the DB to avoid additional formatting in PHP
- Error in integration tests with WP 6.5
- Images not displaying in UI with certain image markups (Irregular polygon, nested, or transformed images) when LL is enabled
- Delegate to the container the creation from dependencies
- Wrong LCP type captured in the DB HOT 3
- Frontend optimization applied for the wrong element in some cases HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-rocket.