This question has been archived.

LEMP + WordPress Media Upload does not crop images

January 19, 2016 2.3k views
Nginx WordPress LEMP Ubuntu

My active installation:

Server: nginx/1.9.9
WordPress 4.4.1
WooCommerce 2.5
Regenerate Thumbnails 2.2.6

My problem is that WordPress does not crop images that I upload in the Media Library, on pages, posts, products etc. I upload images in sizes over 1800x1800px.

No images are being cropped at all.

I have added this to my functions.php:

add_image_size('puff-small', 476, 313, array('center', 'center'));
add_image_size('puff-medium', 476, 626, array('center', 'center'));
add_image_size('puff-big', 952, 626, array('center', 'center'));

I have tested to Regenerate Thumbnails and according to the plugin everyting has been successfully rgenerated but when I look into the Uploads folder nothing have been cropped at all.

I really need some help with understanding what I have done wrong.

Is there anyting in the Server Setup I have missed to do?

I have followed these tutorials step by step regarding the setup of the server:

  1. Step 1
  2. Step 2
  3. Step 3
  4. Step 4
  5. Step 5
  6. Step 6

I then upgraded to php7.0 and upgraded nginx version to the latest.

  • Do you see any entries in your error logs about what may be happening? This almost sounds like ImageMagik is not installed.

  • Hi @davidwashere ,

    Thanks for the quick reply. Is it the nginx error log I need to check or some other log?

    EDIT: I tested to see if it was installed and it was not! I googled for imagick and php7.0 but I could not find how to install it. Do you maybe know how I can install imagick with php7.0?

  • @damir it depends. Chances are it would be in the nginx logs and you may want to switch nginx to run logs for debug verbosity so that you can see more of what's going on.

    Also, make sure imagemagik is working properly. You can run..

    # which convert

    to make sure it's installed as well as inspect the code for Wordpress possibly to make sure it's running the right command to perform the cropping. Also make sure you're running the latest version of the GD package.

    Which OS is this on?

  • I have Ubuntu 15.10.

    I have installed GD and the latest Imagick -->
    I have not succeded in making it work yet...

Be the first one to answer this question.