TTT Crop

TTT Crop Install Statistics

0
100%
Today: 0 Yesterday: 0 All-time: 6,044 downloads
TTT Crop Icon

Try plugin: TTT Crop

We'll create fresh WordPress site with TTT Crop installed. You have 20 minutes to test the plugin after that site we'll be deleted.

Takes ~10 seconds to install.

About TTT Crop

Select any thumbnail size from your theme and crop it in a simple way.

3


0


0


0


0

updated: 7 years ago
since: 10 years ago

Description

This is an easy and fast way to crop any uploaded image in your wordpress. No more complicated graphical editors, photos of people without head or products with wrong view. Select a thumbnail, edit the crop area and save the new thumbnail image.

This plugin doesn’t create any new file or folder, when it saves the new crop area it rewrites the original thumbnail file, this means it doesn’t affect the theme design 🙂

Features

  • The plugin automatically use all images created with the function add_image_size even if they are hard cropped or proportional. More info in https://codex.wordpress.org/Function_Reference/add_image_size#Crop_Mode
  • “Crop Editor” quick link in media list.
  • “Crop Editor” link in featured image widget.
  • “Crop Editor” button inside file details in media manager.


(Thanks to: https://software-lupe.de/review/ttt-crop-thumbnails-auf-mass/)

How to use it

  1. Select an image, open the image editor and click on the Crop Editor button.
  2. Choose the image size you want and crop it.

Recomendations

If you are a developer and you need to rebuild the thumbnails we recommend use this plugin: https://wordpress.org/plugins/ajax-thumbnail-rebuild/ it helps you to do it one at a time.

IMPORTANT: Notice that rebuilding thumbnails will overwrite the thumbnails cropped with the TTT Crop plugin.

Hacks

Just copy&paste this code into your functions.php

Remove sizes from the editor

add_filter( 'tttcrop_image_sizes', 'custom_tttcrop_image_sizes');
function custom_tttcrop_image_sizes( $sizes ) {
    unset( $sizes['thumbnail'] );
    unset( $sizes['large'] );
    return $sizes;
}
?>

Remove thumbnails sizes from the editor for an specific post type

function custom_tttcrop_image_sizes_CPT($sizes) {

    foreach ($sizes as $key => $values) {
        if ($key == 'THUMBNAIL-SIZE1')
            $new[ $key ] = $values;
        elseif ($key == 'THUMBNAIL-SIZE1')
            $new[ $key ] = $values;            
    }

    return $new;
}

Change the name of the image to human friendly names

function local_ttt_crop_human_name($name) {
    switch( $name ) {
        case 'single-slider';
            return 'Home slider image'; break;
        case 'widget-thumbnail';
            return 'Widget small image'; break;

        default:
            return $name; break;
    }
}
add_filter('ttt_crop_human_name','local_ttt_crop_human_name');

This will change the name of the image inside the tooltip when it is selected.