Mini Loops
Cropped or resized thumbnails (11 posts)

  1. Tim Beam
    Posted 4 years ago #

    Some of my thumnails are cropped, some are resized. On my homepage I use the widget and it crops the thumbnails as expected. But on some pages I show post excerpts with thumbnails. These are resized, which looks ugly with some pictures.

    [miniloop number_posts=5 post_type="any" category="-123" tax="teams=321" order_by="date" order="DESC"]<a title="More..." href="[url]">[image from=thumb cfname=image width=120 height=90 class=alignleft fallback='http://domain.com/images/dummies/dummy.png']</a>
    <div class="updates_home_title"><a title="More..." href="[url]">[title]</a></div>
    <div class="updates_post_meta">By [author] <span class="dot">·</span> [date format="l, j. F Y"] <span class="dot">·</span> [comment_count] Comments</div>
    [excerpt up_to_more=1 wlength=150 space_between=1 after="+++" after_link=1]

    Can I activate cropping by any parameter?

    Please help me!


  2. sugardaddy
    Posted 3 years ago #

    There's no scale capability for instance. Only crop.
    That should be activated with the parameter crop=1.

    But behind this, there's a need to scale images by the width or the height (max width or max height). I know how to achieve that outside of mini-loops... but it's a real needed request inside mini-loops.

  3. sugardaddy
    Posted 3 years ago #

    Let me explain my issue (too)...
    With this code :
    [ml_image from=attached height=45 cache=clear]
    It appears that the image has a width of 50px, as the thumb... but I expect an image with a width scaled down by the height. This is a real problem, because I don't want my images to be cropped. And the scale option has not been implemented yet.

    I hope soon ;-)

    (and a big thanks for this wonderful plugin...)

  4. sugardaddy
    Posted 3 years ago #

    Ok I resolved it by defining a width and an height=auto.
    That works (but the image size is scaled and not really reduced).

  5. sugardaddy
    Posted 3 years ago #

    I don't know since when (maybe the last update of WP) but this trick doesn't work anymore...

  6. sugardaddy
    Posted 3 years ago #

    After a little bit of investigation, I can say that the behavior is really weird.
    I have regenerated all my thumbnails but... even with a cleared cache, the plugin generate the thumbnails half the height. Yes ! The images are clearly cutted to half the height.
    This happen when using a defined width and a auto height.

  7. sugardaddy
    Posted 3 years ago #

    Ok. I downgraded mini-loops to 1.1.1 and to 1.1 to check if it was a change in the code of this plugin but apparently not.
    It might be in the last update of WordPress...

  8. sugardaddy
    Posted 3 years ago #

    I'm sorry to revive this topic but anybody has an idea on this issue ?

  9. sugardaddy
    Posted 3 years ago #

    After looking for a solution, I decided to try something by modifying the code of the plugin.
    I just changed the crop option of image_resize to false instead of true (in helpers.php, line 695) :

    $new = image_resize( $file, $width, $height, false, "ml-{$width}x{$height}" );

  10. Kailey (trepmal)
    Volunteer Mod & Reviewer
    Plugin Author

    Posted 3 years ago #

    Working on crop/scale for v1.3, you can get the dev version here

  11. sugardaddy
    Posted 3 years ago #

    Thanks Kailey !! I'll check it later (we are on launch way...)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Mini Loops
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic