Articles of cropping

Disable image rename on upload

When I upload an image (test.jpg) with the Media manager it creates the same image with a digit after its name (test1.jpg). I disabled image cropping so files like test-[width]x[height].jpg don’t appear on upload. But I still have duplicates of the images. So how could I disable this copying and renaming?

Thumbnail generating and posting

I have PHP code that generates a thumbnail, but it crops out the wrong part of the image and displays wrong. How does it know what part to crop out, and how do I fix that to crop out the portion of the image I want? Here is the code: if ( has_post_thumbnail() ) { […]

Force square image crop during upload?

I’m developing my own theme where I have fixed the left sidebar with my photo. Is it possible to force users to crop their image to a square during upload? If yes, how? What functions I will need?

Why does the Hard Crop option Scale?

I have a number of custom image sizes. I noticed earlier, when I was publishing a new post, that the post image was cropped AND scaled. It is exactly the right dimensions.. but it isn’t the portion of the image it should be. This is the code in functions.php, for this particular image size. add_image_size( […]

A way to get featuread image or first image and crop on the fly before display

In Loop = There exist a way or hook to get the featured image, if not, the the first image from post and cropit before display it on frontend? Re-asking my question: On upload. How do I set a featured crop size for a giving custom post type like: news. Thanks in advance.

WordPress image crop probems

i’m developing a portfolio theme on WordPress 3.2.1, so i created a new post_type called ‘portfolio’. My aim is to show, on the front-end, a grid composed by the jobs i realized during last years. This gris will be filled by portfolio post_type thumbnail (featured image), when any user click on them, system shows (through […]

Image with large file size not cropping

I just set hard crop in function 676×429 hard crop. add_image_size(‘home-slide’, 676, 429, true); Its working but client uploaded a large file something like 3800×3800 (5.73mb) and it doesn’t crop. But when I reduce the size by 1600×1600 and it works. Why it doesn’t cropping on large files?

Server B handling add_image_size() differently than Server A

I’m curious what dependencies add_image_size() has because I just copied a theme over to a new server and began adding thumbnails to custom post types only to find out that my request for hard-cropping is being ignored, and the images are kept proportional. functions.php … set_post_thumbnail_size( 80, 80, true ); add_image_size( ‘micro’, 32, 32, true); […]

Mass crop images: Landscape images -> Portrait images

I have several images that are wider than they are tall (landscape). The problem is that the theme I’m using crops images to 150x214px (taller than they are wide). This set up works for the majority of the images but there are still several left with the sides cut off. Is there anyway I can […]

Getting Different Size Of Attachment Images

I’m confused, because there are a lots of functions about attachments . I’ve tried a lots of functions. I’m setting a featured image for my every blog post. I have to get different sizes of this image. FOr example a need this variations of featured image 600px*400px 300px*150px 64px*64px (Images can be cropped). I’m adding […]