• Hello,

    For the past few days, I have been having trouble uploading JPG images to my Media Library on WordPress. The error has only occurred on one particular image. When I try uploading to my Media Library, rather than my image appear in the display box, I get a grey box. Despite this, I am able to pull up the image by going to its associated URL. After getting some advice on here, the overwhelming suggestion was to either upgrade my RAM or optimise my VPS settings.

    I did this and now have 600MB+ of RAM free on my VPS yet still have the same issue. I then thought that it could be the file size. To eliminate this as an issue, I decided to try to upload another file that was greater in size, to which I successfully did this. I then thought that there may be restrictions on the image dimensions. To eliminate this, I decided to change the image dimensions to another image that I knew would successfully upload. I uploaded them both but yet the concerned image would not successfully load while the other image did.

    After tediously going through many possibilities, I thought I would change the name of the image. I changed the name of the image from ‘companies-house-certification’ to ‘certification’ and it successfully loaded. At first, I thought that I have solved the problem but then realised that I have already uploaded many images before with longer image titles, so there must be a core issue that I am overlooking. Just to test, in case it was a recent theme, VPS/Plesk or Database update that is causing an issue, I decided to uploaded a new JPEG image entitled ‘temp-test-image’. This successfully uploaded.

    Is anyone able to point me in the right direction as to identify what could be causing this issue and how I can resolve this matter, I would be greatly appreciative.

    Many thanks.

    Craig

Viewing 4 replies - 1 through 4 (of 4 total)
  • Craig, hello & welcome once again to the WordPress support forum. 1 thing I would suggest is a look at your error logs to see if we can find anything regarding the error. They are often a most overlooked & also most helpful source of information. Indeed, you might try uploading the image again, &, depending on how your logs are arranged, do a
    head or tail command to see if you can quickly find the error. These logs may be located in your webroot, your WordPress folder if installed in a separate folder, or perhaps in your webserver error logs, so you might have to do some detective work to find which one(s) might contain the error.

    Another thing you might try is to set wp_debug to true in your wp-config.php file, then try uploading the image to see if any errors are thrown. This is a security risk, so please change it back to false once you’re done w/your testing. The information obtained, however, could be valuable if something in your WordPress installation is the cause of the error.

    You’ve done a great job of troubleshooting this so far, & I do hope once this has been resolved that you might consider joining the forum volunteers who try to assist folks w/their WordPress issues. I think you’d be a great asset to the community.

    Thread Starter Craig1986

    (@craig1986)

    Hi Jackie,

    Thansk for your welcome and suggestion of going through my Error Logs. Unfortunately, that is something I have already done but nothing unusual stood out. ?? define
    I set the wp_debug to true as follows: (‘WP_DEBUG’, true); and then tried to upload the image. Again, to no success. Like before, if I shortened the file name to just one word, it would upload.

    I am not sure if this would affect anything but I modified the following values in my ‘php.ini’ file as follows:

    memory_limit 256m
    post _max_size 16m
    upload_max_filesize 4m

    Would changing these values have any affect on my issue? I have never come across such an issue like this before.

    Thank you for your suggestion on becoming a volunteer in the WordPress community. I am self taught (and still learning) with the WordPress platform together with learning new aspects about VPS Servers every day. I am by no means an expert but I have learnt a lot during my own journey and once I am fully setup on my latest project, I would be happy to answer a few topics each week, so that those with greater product knowledge, can spend their time answering the more complex topics.

    Once again, thank you for your time with my query.

    Regards

    Craig

    Craig, what plugins are you using?

    Thread Starter Craig1986

    (@craig1986)

    Hi Jackie,

    Apologies for the late response. As further troubleshooting, I thought I would make a backup of my database & webfiles and simply rebuild my VPS. I thought that there may be a server related issue but after resetting everything back to its default settings, I am still none the wiser as to what is causing the issue.

    I try to limit the amount of plugins I use, for both security and performance reasons. At present, I use the following:

    Contact Form 7
    Custom Permalinks
    Yoast SEO
    Core (This is a plugin which came with my theme as to allow theme specific functionality)

    As a side note, I did delete my plugins but still had the issue.

    Have you ever come across something like this before?

    As ever, thank you for your time with my issue. It is appreciated.

    Regards

    Craig

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trouble Uploading Images’ is closed to new replies.