How do change the crop position?
-
How can I change the crop position of images in a thumbnail gallery?
I’m trying to create a gallery using the default WordPress image gallery with 150×150 thumbnail crops of the images. No matter what I do, the crop position will not change. It stays in the center. I’ve used the Post Thumbnail Editor and all it does is make the whole image display.
-
Hi Philbeaux. If you’re using the Hueman theme this section in the documentation discusses the theme thumbnails:
http://hueman.presscustomizr.com/#customization-thumbnailA more general discussion of thumbnails is contained in this article:
http://www.wpexplorer.com/wordpress-image-crop-sizes/Here’s a quick tutorial on cropping images in WP:
http://www.wpbeginner.com/beginners-guide/how-to-crop-rotate-scale-and-flip-images-in-wordpress/Here’s a plugin you might take a look at:
https://wordpress.org/plugins/manual-image-crop/Thanks.
I will look at those resources.Well, I read those resources and took in as much as I could comprehend.
I added the followed the “Change Thumbnail Size” as per the instructions…… copied and pasted to my functions.php file in the child theme. Changed the
add_image_size( ‘thumb-small’, 160, 160, true );
to
add_image_size( ‘thumb-small’, 150, 150, array( ‘center’, ‘center’ ) );
regenerated thumbnails, cleared cache….. no difference.I tried the plugin you suggested (that makes the 3rd so far) ……. no difference.
My head hurts.
The galleries I’m trying to set up are:
http://nflpastplayers.com/herb-adderly/
http://nflpastplayers.com/troy-aikmen/
http://nflpastplayers.com/marcus-allen/add_image_size( ‘thumb-small’, 150, 150, array( ‘center’, ‘center’ ) );
I am by no means an image expert but what I think that code says is to take your original image and cut a 150×150 size thumbnail out of the center, and call that “thumb-small”. Then, everywhere “thumb-small” is used in the theme, it should use that image. If the actual display area is larger than the image, the image will be expanded proportionately to fill the display container. Is that what you’re trying to accomplish? And, just out of curiosity, how are you creating your gallery?
Also, the Other Notes in the Codex reference may apply since 150×150 is a default WP image size.
I was under the impression that the ‘center’, ‘center’ was X-Y coordinates for the crop — but hey, I could be wrong.
As for “array” …. I have no clue. I was just copying what I saw on one of those references. But one thing I find odd, the thumbnails being generated for the galleries are 320×320 in size. Does this have anything to do with anything? I don’t know.
I am creating the galleries with the default media gallery that comes with wordpress. I have tried at least 10 image gallery plugins and none of them are what I’m looking for — and yes, I tried NextGen and while it comes close to what I want to do it isn’t going to work.
I did look at those Codex notes (look at Crop Mode, that’s where I got the idea for center, center) and I am thoroughly confused. What I need to see is examples of what I’m trying to do and just where the heck they go!I am thoroughly confused
You, me and several million other users if WP actually powers 25% of the web (as they claim). Image management has long been, in my view anyway, one of the least documented and most misunderstood functions in WP. Sure, it works, most of the time. And maybe it will get better with the new responsive image feature in v4.4. But that doesn’t address cropping and, when you try to do something like your situation which, by all appearances, should be fairly simple, you spend hours spinning your wheels and still don’t have a solution. Frustrating to say the least.
Anyway, here’s another reference that might be helpful:
http://havecamerawilltravel.com/photographer/wordpress-thumbnail-cropI suppose another option would be to crop, size and compress them outside of WP before you upload them to the media manager. That’s what I do. It’s more work but at least I know what the end result will be.
WOW…all this time I thought it was just me!
I don’t feel so alone now.I have been trying to set up an image gallery for almost a month now and I am about to pull my hair out! I am so with you. It is absolutely ridiculous that it should be this much trouble ……. for everything, not just thumbnail crops!
Believe it or not, NextGen actually did a good job of cropping the thumbs, so I know it’s possible. The author of the Post Thumbnail Editor gave me some pointers. I might look at them again to see if I can figure them out.
And I looked at that link you cited. You may be right about what you said in an earlier reply…. about where the crop is positioned. I’ll try it again.
Thanks BD .. I appreciate it.Guess What????
I actually got the thumbnail to crop.
I took down everything, deleted the database and started over…. but with WordPress 4.3.1 and used Post Thumbnail Editor and just followed the instructions. One thing I do want to point out is I DID NOT change any of the settings in Post Thumbnail Editor. Don’t know if that made a difference, but it’s working now. And when I first tried the Editor it gave me some errors about not finding some image sizes. I went through with it anyway and it came out fine. And I was also able to edit the featured Image Thumbnail as well.
And again, Just a reminder that it was with WordPress 4.3.1, not 4.4.
Oh, and the thumbnails are displaying at 200X200 as well instead of 320X320. Maybe that’s making a difference as well.
Now if I could just get NextGen to work.Well I posted a little to quick.
Cropped images have reverted back to the goofy crop.
But……………..
All was good until I activated JetPack.
The topic ‘How do change the crop position?’ is closed to new replies.
