WordPress.org

Ready to get started?Download WordPress

Forums

Simple Image Sizes
[resolved] Crop from top (6 posts)

  1. chillmen
    Member
    Posted 2 years ago #

    First thank you very much for this free and great plugin. Merci Beaucoup
    I have one question if you can help!
    I need to crop images from top during the process of regeneration.
    Is it possible?

    http://wordpress.org/extend/plugins/simple-image-sizes/

  2. Rahe
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,
    This part of WordPress is not ( for now ) editable, so the images are always cropped the same way... ;)

    Rahe

  3. chillmen
    Member
    Posted 2 years ago #

    Thanks for responding Rahe

  4. Joe Banks
    Member
    Posted 2 years ago #

    Pardon if you've already aware:

    Your best bet, chillmen, is to re-upload the original image with different cropping, easily done with the Enable Media Replace plug-in, especially as one becomes more and more familiar with how WordPress crops.
    http://wordpress.org/extend/plugins/enable-media-replace/

    BTW, Rahe, your Simple Image Sizes plug-in, is on our internal "Crucial for CMS" plugin list, especially on multisite installs!

  5. chillmen
    Member
    Posted 2 years ago #

    Well i found a better (hack) solution for cropping images from top:
    open the file media.php (this file is inside wp-includes)
    Find this lines:

    $s_x = floor( ($orig_w - $crop_w) / 2 );
          $s_y = floor( ($orig_h - $crop_h) / 2 );

    and replace with this:

    $s_x = floor( ($orig_w - $crop_w) / 2 );
          $s_y = 0; //floor( ($orig_h - $crop_h) / 2 );

    And start the regeneration process.

    I found this solution here : link

  6. Rahe
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    If you want to crop form a special position, then use wpThumb plugin for this : Wp Thumb

    Regards,
    Rahe

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic