Support » Plugin: Adaptive Images for WordPress » Background Images & Implementation

  • Hi Nevma,

    I feel like I have read all the posts regarding this topic and I was not able to find a solution.

    I would really like to use your plugin. I need a solution which works in conjunction to what you have made. I need my featured image to be displayed as a background image in my post header. When people access the post on different devices I need the correct image size to load.

    My solution which isn’t loading an adaptive image.

    <?php global $post; ?>
    $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, ” );
    <header class=”entry-header pad-tb3″ id=”startchange” style=”background: url(<?php echo $src[0]; ?> ) !important;”>

    I feel like I’m not the only one experiencing this issue. I am hoping you can help us figure this out. Thanks for your time, – Nate.

Viewing 1 replies (of 1 total)
  • Plugin Author Takis


    Hello, Nate,

    Thank you for reaching out to us!

    Well, if you are not using a CDN or a caching server, like Varnish, then what you are asking is already supported. You see, in these cases, which are the most common, the plugin takes over image handling and it will indeed handle all images, even those in CSS backgrounds. Of course this is true so long as the respective image directories are set in the plugin watched directories.

    On the other hand, if you are using a CDN or a caching server, then a) we do have an experimental feature that supports normal image elements, which will become more stable in the next version, but b) images in CSS backgrounds are still a peculiar case, that we cannot handle, although we do have some ideas for the near future. I hope this is not your case, but we are doing our best to get it to development as soon as possible.

    Let me know if there is anything else you need!


Viewing 1 replies (of 1 total)
  • The topic ‘Background Images & Implementation’ is closed to new replies.