Support » Plugin: Flexible Posts Widget » Remove image size when used in responsive theme

  • Resolved Tika Mazul



    I am wondering what code i need to change here,, in order that the thumbnail images have no set size, and can be controlled by my theme CSS wich states width:100%; height:auto :

    if( $thumbnail == true ) {
    // If the post has a feature image, show it
    if( has_post_thumbnail() ) {
    the_post_thumbnail( $thumbsize );
    // Else if the post has a mime type that starts with "image/" then show the image directly.
    } elseif( 'image/' == substr( $post->post_mime_type, 0, 6 ) ) {
    echo wp_get_attachment_image( $post->ID, $thumbsize );

    Curently, when using Firebug, i can see that it’s taking the thumbnail size as stated in my WP Media Settings. However, images elsewhere on my site and in other plugins don’t seem to be affected by those Media settings, which i prefer.

    thanks in advance of any help anyone can offer.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author DaveE


    Hi oceanazul,

    There isn’t really a way to “disregard” image sizes in WordPress. In order to get an image from WordPress, you have to tell it what size to get. There are a number of predefined sizes available.

    That being said WordPress allows you to get the original image as it was uploaded using the size full. FPW doesn’t currently have an option to get the “full” size image because this is generally a bad idea since that would mean a full-resolution image from a digital camera (5mb-6mb or more) could potentially be sent to ever visitor’s browser. You can override this limitation by creating a custom HTML template and then changing out the line that says:

    the_post_thumbnail( $thumbsize );


    the_post_thumbnail( 'full' );

    Thanks for using the plugin!

    Tika Mazul


    Hi Dave,

    Thanks for responding, i’ll research that workaround you suggested 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove image size when used in responsive theme’ is closed to new replies.