Solved

Weird Wordpress Media Library image preview problem

Posted on 2016-10-02
9
19 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
 

Author Comment

by:princeservice
ID: 41830365
Terry,

I am using cPanel on a VPS.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …

757 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now