• Resolved freeth1nker

    (@freeth1nker)


    Hi,

    Plugin ver. 2.3.2

    I’m trying to change the standard URL for placeholder_url to inline code. I created the code

    apply_filters('a3_lazy_load_placeholder_url', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
    

    in my functions.php file and there is no effect.

    What am I doing wrong?

    • This topic was modified 4 years, 7 months ago by freeth1nker.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Steve Truman

    (@a3rev)

    Filters are already defined, you don’t need to define again.

    Try using

    add_filter

    Example

    add_filter( 'a3_lazy_load_placeholder_url', function( $image_url ) {
     $image_url = 'your_new_image_url'; // put your new image url here
     return $image_url;
    } );

    Change your_new_image_url to your real image url or image data

    Steve

    Thread Starter freeth1nker

    (@freeth1nker)

    @a3rev Thank you.

    It works:

    add_filter('a3_lazy_load_placeholder_url', function() {
    	return 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
    });

    It should be in an API or FAQ for newbies like me. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Does “a3_lazy_load_placeholder_url” work?’ is closed to new replies.