Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    that you’ll have to ask the A3 lazyload developers zotezo ??

    frank

    Thread Starter zo

    (@zotezo)

    As the image optimization is happening in shortpixel thats why asking this question here…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Sure, but the original img tag is a3 lazyloads, AO does not touch that, it only changes the src.

    Thread Starter zo

    (@zotezo)

    Hi Frank,
    Not getting any help from them.
    Need your help.

    // Check for current page is excluded
    		global $a3_lazy_load_excludes;
    		$is_excluded = $a3_lazy_load_excludes->check_excluded();
    		if ( $is_excluded ) {
    			return;
    		}
    
    		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ), 11 );
    
    		add_filter( 'a3_lazy_load_html', array( $this, 'filter_html' ), 10, 2 );
    
    		$this->iframe_placeholder_url = apply_filters('a3_lazy_load_iframe_placeholder_url', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7');
    		$this->_placeholder_url = apply_filters( 'a3_lazy_load_placeholder_url', A3_LAZY_LOAD_IMAGES_URL . '/lazy_placeholder.gif' );
    // don't to the replacement if a skip class is provided and the image has the class, or if the image is a data-uri
    			if ( ! ( is_array( $this->_skip_images_classes ) && preg_match( $skip_images_regex, $imgHTML ) ) && ! preg_match( "/src=['\"]data:image/is", $imgHTML ) && ! preg_match( "/src=.*lazy_placeholder.gif['\"]/s", $imgHTML ) && ! $a3_lazy_load_excludes->has_skip_lazy_attribute( $imgHTML ) ) {
    				$i++;

    How to add alt tag on lazy_placeholder.gif?
    Thanks,

    • This reply was modified 4 years, 2 months ago by zo.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I don’t have time to look into how their filters can be used zotezo, but you could always try to force something with the autoptimize_html_after_minify filter, doing a str_replace to replace a3-lazy-load/assets/images/lazy_placeholder.gif" (a space at the end) with a3-lazy-load/assets/images/lazy_placeholder.gif" alt="a3 lazyload placeholder image" (again with a space at the end) or something?

    Thread Starter zo

    (@zotezo)

    Hi Frank,
    I need your kind help to achieve the same.kindly help me…I am not aware of the code..
    Thanks

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    sorry Zo, but I don’t really have the time and fixing things outside of AO’s realm is not high on my priority list.

    Thread Starter zo

    (@zotezo)

    Actually they are not responding, your help will be always appreciated…

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Want to add alt tag’ is closed to new replies.