Codeinwp / Codeinwp/optimole-wp

Automatically detect images "above the fold" and avoid lazyloading them on every page

Open
#622 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

doc-needed new feature
Dominant language
PHP
Stars
72
Forks
14
Avg merge
2d 9h
Merged PRs (30d)
15

Description

What problem does this address?

Edit(VB): For PRF I recommend implementing it the way user and Marius suggested below to reduce complexity - setting per device let's say, i.e. have a different value for mobile/desktop/tablet, tweak this setting depending on the page.

Currently, you can exclude a certain amount of images from Optimole's lazyload feature per page (defaults to 3). However, the amount of images above the fold often varies per pages, and when this happens, it only betters the performances of the pages which has an amount of above the fold images match that number.

What is your proposed solution?

At the very least, avoid lazyloading images that are detected as hero images (seems like hero image detection is already a feature from version 3.9.0). At best, use a system similar to LiteSpeed cache's VPI feature, like so:

image

Will this feature require documentation? (Optional)

Yes, it requires documentation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing per-page lazyload exclusion setting and the hero-image detection mentioned in the issue. The work is complete when above-the-fold or hero images are identified per page and device and are excluded from lazyloading, with the required behavior documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
frontend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.