Forum Replies Created

Viewing 15 replies - 106 through 120 (of 170 total)
  • Thread Starter Aldo

    (@ab_lu)

    Hi Stefan

    Thanks for the feedback!
    It’s the full image size who is used, so I cannot exclude it. Any other way?

    Thanks
    Aldo

    Thread Starter Aldo

    (@ab_lu)

    Hi Stefan

    Thanks for the updated version.
    This looks great.

    One question about the Media Query settings.
    Is there already any documentation how to handle this?

    Let’s say I have this attributes. How would I reflect this in the GUI?

    $rwp_attributes = array(
    								'sizes' => array( 'small-gallery-size', 'small-gallery-size@2x', 'medium-gallery-size', 'medium-gallery-size@2x', 'large-gallery-size', 'large-gallery-size@2x', 'xlarge-gallery-size', 'xlarge-gallery-size@2x' ),
        							'media_queries' => array(
            											'medium-gallery-size' 	=> 'min-width: 600px',
            											'large-gallery-size' 	=> 'min-width: 1335px',
            											'xlarge-gallery-size' 	=> 'min-width: 1800px'
        							),
        							'retina' => true,
        							'attributes' => array(
        												'img' => array(
                											'class' => 'lazyload img-responsive'
                									),
        							'ignored_image_formats' => array( 'gif' )
            						)
        						);

    Thanks!
    Aldo

    Thread Starter Aldo

    (@ab_lu)

    Hi Stefan

    Thanks a lot for your feedback!

    I agree regarding implementing this option into the settings or integrate lazyload.

    What I was referring to is to add an option for the settings array, where the replacement can be set directly as parameter.
    But the new filter looks great to me.

    I’ll not be able to test it this week, but I’ll get back to you a soon I checked it out.

    Thread Starter Aldo

    (@ab_lu)

    All clear now, Thanks a lot!

    Thread Starter Aldo

    (@ab_lu)

    So for what is the retina attribute exactly? If HiRes images are still returned for Retina screens without setting retina to “true”?
    Somehow I don’t understand that.

    And as for my previous question:
    You say I’m not doing anything wrong. To return an image bigger than 350px on retina, shall I add another media_query and corresponding size?
    Or different asked, how should my setup look like to have images in the correct size?
    Add an “featured-medium-image” with 450px?

    Thread Starter Aldo

    (@ab_lu)

    Thanks for the quick feedback!
    So what would be the best to overcome this?
    add an additional media query with his own size?
    BTW: Can I add another media query with another name than the image sizes defined above?

    thanks!
    Aldo

    Thread Starter Aldo

    (@ab_lu)

    Sounds great!

    Thread Starter Aldo

    (@ab_lu)

    For the featured image I can apply the same workaround with str_replace().
    Regarding he images in the_content, could you not add an option into core of the plugin, where we can enable/disable srcset and use data-srcset instead?
    The problem applying str_replace to the_content messes up all the captions.

    Thread Starter Aldo

    (@ab_lu)

    This works withe the manually added Picture::create.

    How can I change it in the automatically replaces images in the_content and the featured images?

    Thread Starter Aldo

    (@ab_lu)

    Thanks for the quick feedback!

    But this involves setting me all the images manually.

    $rwp_attributes = array(
    	'sizes' => array( 'medium-image', 'medium-image@2x', 'large-image', 'large-image@2x' ),
    	'media_queries' => array(
    		'medium-image' 	=> 'min-width: 450px',
    		'large-image' 	=> 'min-width: 600px'
    	),
    	'retina' => true,
    	'attributes' => array(
    		img' => array(
    			'class' => 'lazyload img-responsive'
    		),
    	'ignored_image_formats' => array( 'gif' )
    )
    );
    echo Picture::create( 'element', $plan_image["ID"], $rwp_attributes );

    Is there not a way where I can just say use data-srcset instead?

    Thanks for your example.
    I ended up filtering by mime_type and if there is a Gif I use the standard WP function.

    Cheers!
    Aldo

    Hi Stefan

    Thanks for your quick feedback!
    Still no output. I get an empty tag:
    <picture ><!--[if IE 9]><video style="display: none;"><![endif]--><!--[if IE 9]></video><![endif]--><img srcset="" class="lazyload img-responsive"></picture>

    Hi Stefan,

    Just tried to disable GIFs. Unfortunately they are not excluded. Does this apply even using echo Picture::create( 'element', $image["ID"], $rwp_attributes );?

    Thanks
    Aldo

    Thread Starter Aldo

    (@ab_lu)

    Hi Stefan

    I’m using <img>.

    The code a use looks like this:

    $rwp_attributes = array(
    								'sizes' => array( 'small-gallery-size', 'small-gallery-size@2x', 'medium-gallery-size', 'medium-gallery-size@2x', 'large-gallery-size', 'large-gallery-size@2x', 'xlarge-gallery-size', 'xlarge-gallery-size@2x' ),
        							'media_queries' => array(
            											'medium-gallery-size' 	=> 'min-width: 600px',
            											'large-gallery-size' 	=> 'min-width: 1335px',
            											'xlarge-gallery-size' 	=> 'min-width: 1800px'
        							),
        							'retina' => true,
        							'attributes' => array(
        												'img' => array(
                											'class' => 'lazyload img-responsive'
                									)
            						)
        						);
    							echo Picture::create( 'element', $image["ID"], $rwp_attributes );

    The problem is, that files for the size xlarge-gallery-size@2x do not exist, and there I would like to use the full source image I uploaded.

    Thanks!

    Bump?

Viewing 15 replies - 106 through 120 (of 170 total)