• Resolved sevek.im

    (@sevekim)


    So, there is a plugin that the lazy load does not automatically add the class and data-lazy-type to it.

    Could you guide me on how I can manually enable the feature on the php file?

    For example, let say I have a custom php file which the plugin does not automatically enable the feature.

    How can I add the feature to the php file?

    Thanks!

    https://www.ads-software.com/plugins/a3-lazy-load/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Nguyen Tuan

    (@nguyencongtuan)

    Hi Sevek

    You can read this topic Working with video shortcodes to see how to apply lazy load for your php file

    Simple you just put all ouput content into this

    return apply_filters( ‘a3_lazy_load_html’, $your_output_content );

    and a3 lazy load plugin will auto find the image, video, iframe to apply lazy load for the content you parse

    Or if don’t want to use that, you can manual edit your image tag from

    <img src=”https://domain.com/imageurl.jpg&#8221; class=”” />

    to

    <img src=”” data-lazy-type=”image” data-src=”https://domain.com/imageurl.jpg&#8221; class=”lazy lazy-hidden” />

    Regards,
    Nguyen

    Plugin Author Steve Truman

    (@a3rev)

    Hello sevek.im

    Just following up from Nguyen’s post from a week ago. As your topic has not been updated in 7 days I trust that the information that he gave you helped you apply lazy load to that other plugin.

    I will change your topic state to [resolved] for you, if you require more help with the issue please just update the post.

    Regards – Steve

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Manually add lazy load in php’ is closed to new replies.