• Resolved sofia546

    (@sofia546)


    Dear Forum Members,

    I am unable to upload selective images – “An error occurred in the upload. Please try again later.” These images display as a blank thumbnail, or only the title of the images are seen in the Media Library page. I can add these blank thumbnails to my blog posts, but they do not show when selected as featured images. The featured images on my blog page (https://sofia.com.sg/blog) are blank.

    I have tried:

    – Resizing the images to dimensions of various combinations (3000×2000, 1200×1000, 750×500)
    – Changing file permissions on the uploads folder to 755
    – Disabling all plugins (does not work as well)
    – Adding a path for temp uploads (“/tmp”) on php.ini
    – Changing Media > Settings > to check and uncheck organize folders into years and months (both does not work)

    Would be very appreciative if I could get a lead on what is wrong!

    Website: https://sofia.com.sg

Viewing 4 replies - 1 through 4 (of 4 total)
  • PHP has an upload filesize limit and memory limit.
    so if you have access to root on your server, then try editing php.ini and change variables memory_limit, upload_max_filesize, post_max_size.
    also there is a PHP memory allocation variable for WordPress exclusive. for that, use define( 'WP_MEMORY_LIMIT', 'xxM' ); define( 'WP_MAX_MEMORY_LIMIT', 'xxM' ); in wp-config.php file.
    you can readup on them before editing. edit with care!
    also remember to restart php services (and maybe apache) for it to work.

    PS: your images are horribly heavy! i checked https://sofia.com.sg/flaxseeds/. the first image is 6000x4000px and has a freaking 8.4MB filesize! this will increase page loadtime, hit SEO, etc. when we code, except for very few images which are graphic heavy, we keep all images in 100-700kb range (in bout 3-4000×1-200px range). food for thought.
    how to: try photoshop. open your image and go for ‘save for web’ in file menu. try saving with jpg->high parameters and with bout 1920×1200 or 1800×1200 or so image res. you should end up with a sub <500kb file with no clarity loss.
    and then you can change jpg quality to 100% in WP so WP doesnt crunch it. that would be by adding filters in functions.php

    Thread Starter sofia546

    (@sofia546)

    Dear Shadez,

    Sorry for the late reply! It took me some time to read up and understand editing the PHP on filesize limit and memory limit.

    I saved all my images on photoshop under ‘Save for Web’ and all my images are uploading perfectly now on WordPress! Thank you so much for the very detailed instructions and guidance and for taking time to look at my website for a fix. I really really really appreciate it! ??

    Oh.. you mentioned “Adding a path for temp uploads (“/tmp”) on php.ini” so i thought you are comfortable editing your server config files.
    Anyways glad to know things are working now.
    Please mark thread as resolved.
    Cheers..

    Thread Starter sofia546

    (@sofia546)

    Thank you ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Certain Images Receive Upload Error Messages’ is closed to new replies.