• Resolved ckubs

    (@ckubs)


    Hello.
    I’m using your plugin for about a day and It has everything I need, minus one small thing.
    Is there any way I can make some of the thumbnails proportional instead of square? Although the 3 news feeds are ok like that, I’m trying to add another one, separatelly tha’s all about the images and making the stuff squared, your plugin puts some border on top and bottom and cuts the image left-right margins.

    Thank you.

    https://www.ads-software.com/plugins/feedzy-rss-feeds/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,
    I’m not sure to have well understood everything you said, but you can force images dimensions in CSS like this :

    .feedzy-rss .rss_item .rss_image,
    .feedzy-rss .rss_item .rss_image span{
    	width:150px !important;
    }

    Any chance you provide a link ?

    Thread Starter ckubs

    (@ckubs)

    Unfortunatelly I can’t provide a link now because my site is in maintenance mode untill I finish to add everything over there( at the beggining of January switched from WordPress to Joomla and after I saw I takes me too much time to maintan my site on Joomla switched back, 2 days ago).

    Maybe I ca explain it better. When I add a feed widget and set the thumbnails at a smaller size( let’s say 48px) I like the output, that they are square.

    When I want the thumbnails to take whole widget width, in my case 300px( the feed I want to output that way is from a photo site) I don’t want the plugin to make square images like it does now but proportionally images. If the original is 600x300px the output to be 300px200px( or something like that), not 300x300px with left and right margins being cut.

    Ok,
    So those CSS lines sould do the trick :

    #YOUR-widget-ID .feedzy-rss .rss_item .rss_image,
    #YOUR-widget-ID .feedzy-rss .rss_item .rss_image span{
    	width:300px !important;
    	height:200px !important;
    }
    Thread Starter ckubs

    (@ckubs)

    Ok I understand you but 300x200px it was just an example. I’ll try that but I’m not shure it will help me that much because I’m not shure the original images from the feed have all the same size, to not look distorted.

    Actually, images are used as centered background to never being stretched ??
    So you can use any size as far it is smaller or at least equal to the original image size and it will always looks good.
    I used this method for a wider compatibility with any feeds and because it is the lightest method in my thought.
    So try it !
    Cheers.

    Hi,
    Version 2.4 provide a new hook to let you change the thumbs aspect ratio.
    You’ll find the documentation on my site.

    Here is the solution:

    function bweb_feedzy_thumb_aspect_ratio( $sizes, $feedURL ) {
        $sizes = array(
            'width' => $sizes['width'] * (16/9),
            'height' => $sizes['height']
        );
        return $sizes;
    }
    add_filter( 'feedzy_thumb_sizes', 'bweb_feedzy_thumb_aspect_ratio', 10, 2 );

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Proportional scaled thumbnails?’ is closed to new replies.