add_image_size() to crop images into squares?

If you pass true for the last $crop argument then so called “hard” crop mode is used. This will make WP produce results at exact size specified, except few edge cases (if image uploaded is smaller than specified size for example). Note that original image is still retained as is. If you need to actually … Read more

Confusion about arguments sent to add_image_size

As @PieterGoosen said, your point is valid. A look into the source confirms that the codex description of add_image_size was wrong there. It was, because I changed it to be correct. That said, everyone can help improving the codex, you just need to register. You might want to take a look at Contributing to WordPress … Read more

Local WordPress installation doesn’t crop images

For the record since I ended up here when experiencing the same issue on my localhost: In php.ini, Uncomment the line with: extension=php_gd2.dll Restart apache / all services This sorted it out for me (I may have switched a few other services on while I was there, but I believe this is what fixed it!)

Generated media have incorrect aspect ratio

Under settings >> media, change the height attributes to 9999, and untick Crop thumbnail to exact dimensions (normally thumbnails are proportional) under the thumbnail size if it is ticked. When you are done, download and install “Force Regenerate Thumbnails”. This is actually better than “Regenerate Thumbnails” as it deletes all redundant image sizes.