Closed bobbingwide closed 2 years ago
For [bw_portfolio] replace the retimage() call with bw_thumbnail_full( $matched_post )
The PHPUnit tests will need changing to cater for this change.
The PHPUnit tests will need changing to cater for this change.
These changes were incorrectly reported against #187
Code was in v4.5.0. oik v4.7.2 now released. Closing therefore.
In https://make.wordpress.org/core/2020/07/14/lazy-loading-images-in-5-5/ we can read about the WordPress support for lazy loading images.
Some of the
<img>
tags created by oik's shortcodes ( and blocks? ) are not automatically handled sincewidth
andheight
attributes.wp-image-$id
classRequirement
[bw_logo]
,[bw_images]
,[bw_attachments]
,[bw_portfolio]
[bw_qrcode]
,[bw_follow_me]
Proposed solution
[bw_logo]
automatically setloading=lazy
when thewidth
andheight
attributes are set.[bw_images]
changebw_force_size()
to not null out the width and height values when the size is not an array.[bw_images]
will also change the output for[bw_attachments]
[bw_portfolio]
replace theretimage()
call withbw_thumbnail_full( $matched_post )
titles
parameter for the[bw_images]
shortcode.pseudo code for setting "loading=lazy"