Opeyemi Ibrahim

Results 30 comments of Opeyemi Ibrahim

Because of the issue raise in the first solution, I came up with some pointers from @wordpressfan. I created a draft [PR](https://github.com/wp-media/wp-rocket/pull/6626). I'll add test foe different cases to make...

### Scope a solution ✅ #### src/wp-rocket/assets/js/lcp-beacon.js In `_getElementInfo()` check if element_into.src is a valid url before returning the element_info. We could do something like this ``` const image_src =...

We can also do the same thing on the backend should in case anything slip through the frontend

> I was thinking of doing that from the php side, exactly here: > > https://github.com/wp-media/wp-rocket/blob/715e19cf5eb38fa51ae566422015b74d947f55b5/inc/Engine/Media/AboveTheFold/AJAX/Controller.php#L53 > > not from the JS side @Khadreal Okay. I'm thinking we could that...

> as a final decision, we need to exclude the following urls: > > ``` > https://domain.ext/file.php?url=img.jpg > https://domain.ext/file.js?url=img.jpg > https://domain.ext/file.php#url=img.jpg > chrome-extension://extension-hash/path/to/image/x.svg > linear-gradient(160deg, rgb(255, 255, 255) 0%, rgb(248,...

I suggest we stick to option 1, option 3 is safer but what do we categorise as special characters ? -https://atr-law.co.il/wp-content/uploads/2023/01/עדי-רידלמן-ראשי-ארוך-200x300.webp -wp-content/themes/guardian2021/images/[email protected] We need to decide what's and what not...

Created a draft PR [here](https://github.com/wp-media/wp-rocket/pull/6653)

Using `lazyload_css_background_images.php` template the stylesheet is not lazyloading cause the regex won't capture this `` because there's no quote around the href. https://github.com/wp-media/wp-rocket/blob/631fc90017805c8063340c771598b1ccec713772/inc/Engine/Common/ExtractCSS/Subscriber.php#L67-L70 Modifying the regex above solve the issue...

If you check on firefox it shows the 404 error for lazyload-css.min.js.map

I'm thinking of using something like this `/(?P[^{}]+)\s*{\s*(?>[^{}]+{[^{}]*})*\bbackground\s*:\s*(?P[^;}]+)/` which would be faster compared to the current one for the background regex. It doesn't rely on the OR operator like the...