• Im using wodpress′s ‘wp_get_attachment_image’ that automatically adds srcset in all resolutions, my problem is that WordPress doesnt detect densities on screens.

    My idea is uring your plugin to do the retina stuff, but there are loads of images and I dont want to edit all the different phps with images to use ‘rwp_picture’.

    Other issue I′m having is that I dont know how to add a class using ‘rwp_picture’ … I′ve tried this:
    rwp_picture( $image['ID'], array( "class" => "img-responsive margin-bottom-small wow fadeInUp" ) );

    Thank you very much for a great plugin!!!

    • This topic was modified 8 years, 5 months ago by alezzzzz.
Viewing 1 replies (of 1 total)
  • Plugin Author stefanledin

    (@stefanledin)

    Hi alezzzzz!
    I’m not quite following how you’d like to use rwp_picture(). But the srcset attribute on <img> will make the browser select the most appropriate image based on width an density of the screen.

    Second question:
    You have just forgotten to wrap the class array inside an attributes array.

    
    rwp_picture( $image['ID'], array(
      'attributes' => array(
        'class' => 'img-responsive margin-bottom-small wow fadeInUp'
      )
    );
    
Viewing 1 replies (of 1 total)
  • The topic ‘override ‘wp_get_attachment_image’ instead of using ‘rwp_picture’’ is closed to new replies.