I setup WordPress on my own server and it's up and running...one thing that I have noticed is that WordPress doesn't generate any images I upload. Usually when I upload an image through WordPress it will generate a thumbnail, medium, and large sized image. WordPress installed without error and everything else is working fine. I have tried to rebuild the thumbnails, but that doesn't work :-(

Any ideas?

Thanks,
Josh

up vote 15 down vote accepted

I figured it out!

In my php.ini file I had to uncomment extension=php_gd2.dll, then it started working after I rebuilt the images I uploaded :)

Thanks,
Josh

  • 2
    The need of the gd extension was indeed the problem for me. On my CentOS server I just had to yum install php-gd and service httpd restart though. Thanks for pointing me in the direction! – danijar Sep 29 '15 at 21:55

I solved the issue as well.

With reference to Josh Rodgers' answer, I had to log into my server's CPANEL, under "Software and Services", depending on how your server is set up, there is "Select PHP Version", then tick the "gd" box, save, and refresh your wordpress post or media page, then retry the upload.

If you are looking at your wordpress via FTP, you can refresh your uploads folder and see that the various sizes have appeared, i.e. imagename100x100.jpg, etc, etc.

I hope this helps someone.

Bernard

I was having the same problem on my new server install with Ubuntu 16.04 and PHP 5.6. The problem is that Wordpress relies on the PHP GD module in order to generate the thumbnails. The insight from Josh led me to install the GD module using this command via SSH:

sudo apt install php5.6-gd

And then restarting apache:

sudo service apache2 restart

Worked like a charm!

I don't have enough reputation to comment @guilherme-vaz answer. His solution worked but I had to check which version I am using.

Use php -v cmd to find php version you are using, and then install gd. In my case it was 7.1. So I did sudo apt install php7.1-gd and restart apache sudo service apache2 restart

This isn't the most useful answer, but it is another variation - which I just spent a couple hours on.

I did just go through this...... and it was actually the file.

My site was throwing a hard 500 error after the initial upload of a few files - so apparently the thumbnail process. I got a couple files to fully upload individually, but not this one.
As with other people, I could see the file in the library, but without a preview image, and it did not have any usable images for the file if I tried to insert it.

I don't know how I have this magic file that breaks WP.
It opens fine on my laptop.

But with trying additional, individual files at the request of my hosting company, it became clear it was actually the specific file -- more than a little unexpected.

I re-created the file in a different format and that was the end of it.

Ubuntu 16.04 PHP 7.0 here.

Was missing GD extension on my PHP install.

Had to do

sudo apt-get install php7.0-gd
sudo service apache2 restart

And that fixed it.

Note that before searching for "gd" in my PHP info gave just 1 result, after there was not a whole section about GD.

source: https://www.digitalocean.com/community/questions/is-there-a-php-gd-command-for-php7

protected by Community Sep 10 '17 at 20:10

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.