Solved

Weird Wordpress Media Library image preview problem

Posted on 2016-10-02
9
23 Views
Last Modified: 2016-10-11
For starters I moved the site from one server to another like I have done many times before but this is the first time I have seen this problem.

When I go to upload pics in the media library is seems to work fine:

After uploading
But when I go to refresh the page I get this:

After Refresh
If I go to the attachment details it also does not display the picture BUT the path does work and will display the picture in a browser.

Image Details
So really everything works except the preview which kinda makes things a pain in the butt to work with.

Any ideas? Thanks in advance for your help.
0
Comment
Question by:princeservice
  • 6
  • 3
9 Comments
 
LVL 35

Expert Comment

by:Terry Woods
ID: 41825679
Have you tried using the dev tools in your browser to "inspect" the elements having the problem? This will probably help you find some more information on why it's happening.

Which browser are you using? In Firefox or Chrome, hit F12 to open the dev tools then, right click on one of the image's that's not loading, and choose Inspect or Inspect Element.

Hopefully that will give you the URL of the image that it's trying to load.
0
 

Author Comment

by:princeservice
ID: 41825701
I tried that but Wordpress is replacing the image for the thumbnail review with this:

https://woodbydana.com/wp-includes/images/media/default.png

and not even going to:

https://woodbydana.com/wp-content/uploads

where are the files are. In fact, not that I look, Wordpress is not even generating thumbnails anymore for me.
0
 
LVL 35

Expert Comment

by:Terry Woods
ID: 41825780
Are you using cPanel for the server, or just Linux, or something else?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:princeservice
ID: 41830365
Terry,

I am using cPanel on a VPS.
0
 
LVL 35

Expert Comment

by:Terry Woods
ID: 41831231
I think your PHP installation may be missing the php-gd package.

If you install the plugin "WordPress phpinfo" to your site, activate it, and go to Settings > WordPress phpinfo, then it should have something like included in the output:

Configure Command	'./configure' '--disable-fileinfo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql' '--with-mysqli' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr' '--with-litespeed'

Open in new window


See how the option --with-gd is included. If yours is missing that option, then you need to figure out how to add it, whether it be by contacting the hosting company, or by enabling the option yourself on your own server.
0
 

Author Comment

by:princeservice
ID: 41831828
Terry:

Configure Command      './configure' '--disable-fileinfo' '--disable-opcache' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-intl' '--enable-libxml' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-sqlite-utf8' '--enable-zip' '--prefix=/usr/local' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-enchant=/usr' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-icu-dir=/usr' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql' '--with-mysqli' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-pspell' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'
0
 

Author Comment

by:princeservice
ID: 41831857
Two more things to consider:

When I upload an image the blue bar moves to 100% then it disappears. I get an HTTP error at the bottom of the page. I then refresh the page and I get the generic image placeholder like shown above.

The image does get uploaded
The link created by Wordpress does work if I manually go to it.
The image does not get duplicated and resized for thumbnails and medium size pics.
This is actually happening on the two sites I have moved over from GoDaddy VPS to InMotion VPS.
This is not happening on websites that were originally created on the new server.
I have tried using the default 2015 template vs the DIVI I am using but it still does not work.

It has something to do with the transfer of the site from one VPS to another.
0
 

Accepted Solution

by:
princeservice earned 0 total points
ID: 41832339
I seemed to have found the solution:

https://github.com/getsource/default-to-gd
0
 

Author Closing Comment

by:princeservice
ID: 41838090
Found the solution myself
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Like there are many different versions of Wordpress, there are also a handful of related side projects WordPress users should be familiar with.   All of these projects are open source and GPL licensed, which means there are few restrictions to us…
What's this? As a volunteer Page Editor for Experts-Exchange.com, I have noticed that many authors also have blogs, and pull articles from their blogs to post at Experts-Exchange. I appreciate each author sharing their blog content with our site …
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question