Forums

Thumbnails cropping on the center by default? (7 posts)

  1. jacof
    Member
    Posted 1 year ago #

    First of all my apologies if this is already cover, and please redirect me to the solution if it exists.

    WordPress add_image_size() routine calls ultimately for a function called image_resize_dimensions(), which returns the dimensions of the "cropped image" (media.php - http://xref.yoast.com/trunk/nav.html?_functions/media.php.html)

    How could it be that the cropping center is always the absolute center of the image?

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

    Due to this, all of my custom thumbnails are resulting cropped around wrong centers. Photos of trees, cars, women return a thumbnail cropped on a hand, a wheel, or any unnecesary space.

    WordPress' Editor inside the Multimedia dialog doesn't seem to affect custom thumbnails. Only the WP thumbnail defined in the admin panel.

    What can I do? I would like to select the cropping centers of my custom thumbnails, and not to be contrained on cropping them around the gravity center.

  2. jacof
    Member
    Posted 1 year ago #

  3. jacof
    Member
    Posted 1 year ago #

    Update: Quick fix -Not user-friendly: Regenerating thumbnails with "Regenerate Post Thumbnails" plugin after modifying it's dimensions in the Image Editor gives de correct thumbnails, but results in a overload of files in the server. (i.e. all of the thumbnails for the original + original + all of the thumbnails for the resized + resized). Maybe a modification of this plugin to delete prior thumbnails from fs as well as from db would make a temporary fix, given there's no point in saving "backup" copies of the thumbnails.

  4. jacof
    Member
    Posted 1 year ago #

    I can't believe no one will answer this. This is a serious mistake in WordPress' coding and planification.

  5. James
    Happiness Engineer
    Posted 1 year ago #

    Please follow this guide to report your bug:

    http://codex.wordpress.org/Reporting_Bugs

  6. jacof
    Member
    Posted 1 year ago #

  7. jacof
    Member
    Posted 1 year ago #

    The ticket has been assigned.

Topic Closed

This topic has been closed to new replies.

About this Topic