Listener would like pages to load faster by lazy loading images in notes #99

Closed
opened 2023-03-18 10:05:36 +00:00 by gordons · 3 comments
Collaborator

The home page has 10 episodes listed with their notes. Sometimes these notes contain images. Offscreen images should be lazy loaded since there are not needed on initial page load saving data and time. The browsers will load them in just before they are needed to be seen.

The home page has 10 episodes listed with their notes. Sometimes these notes contain images. Offscreen images should be lazy loaded since there are not needed on initial page load saving data and time. The browsers will load them in just before they are needed to be seen.
rho_n added the
Feature Request
label 2023-03-18 20:10:13 +00:00
Owner

I think this will be relatively painless using the TT2 Filter replace macro.

Filter data from the "show" column from the eps table for '<img ' and replace with '<img lazy="loading" '

I think this will be relatively painless using the [TT2 Filter replace macro](http://tt2.org/docs/manual/Filters.html#section_replace_search_replace_). Filter data from the "show" column from the eps table for '<img ' and replace with '<img lazy="loading" '
gordons was assigned by rho_n 2023-03-18 20:25:07 +00:00
Author
Collaborator

I already did this in a slightly different way.
See 610e91ea9f

It's the notes column, not a show column, unless someone has changed the database.

The variable names can changed, and maybe move the macro into another file if you think that would be better.

I already did this in a slightly different way. See https://repo.anhonesthost.net/rho_n/hpr_generator/commit/610e91ea9f77c0e5ffabc2570426338afb956c06 It's the **notes** column, not a _show_ column, unless someone has changed the database. The variable names can changed, and maybe move the macro into another file if you think that would be better.
Owner
[Merged into main](https://repo.anhonesthost.net/rho_n/hpr_generator/commit/0e9ad6ba65e71cb6f768ced7bec166dbd3b89bd2)
rho_n closed this issue 2023-03-28 02:20:36 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rho_n/hpr_generator#99
No description provided.