Support » Fixing WordPress » Corrupted images in Media Library

  • Hello. I have never been able to upload images to my media library. There is no error message. The images always appear corrupted. I have done a lot of Googling and looking on WP forums for the solution, and it seems like an issue for many but I am at my wit’s end trying to solve this problem myself.

    Things I have tried:
    Followed the instructions here, setting directory permissions first to 744 then to 755. 744, 755 and 777 didn’t work.
    Admin>settings>media>unticked “organize my uploads…” box
    Checked filepath in phpMyAdmin in wp_options
    Cleared my browser’s cache
    Disabled all plugins
    Tried uploading in Microsoft Edge instead of Chrome
    Checked the dev console for errors and found errors like these:

    Error in event handler for (unknown): TypeError: Cannot read property 'sieve' of undefined
        at Object.find (chrome-extension://immpkjjlgappgfkkfieppnmlhakdmaab/includes/content.js:48:479)
        at Object.m_over (chrome-extension://immpkjjlgappgfkkfieppnmlhakdmaab/includes/content.js:114:170)
        at Object.init (chrome-extension://immpkjjlgappgfkkfieppnmlhakdmaab/includes/content.js:141:59)
        at init (chrome-extension://immpkjjlgappgfkkfieppnmlhakdmaab/includes/content.js:137:45)
    Failed to load resource: the server responded with a status of 404 (Not Found)

    I don’t know what the first error is (there was another similar one) but the second one refers to my “uploaded” (corrupted) images (most of the errors look like that one). That’s not really surprising but if that’s relevant information I’m putting it here.

    Nothing works. Maybe there’s something really obvious I’m missing.

    If this is relevant at all, my WP blog lives inside my site, for example to get to my site I hit public_html in FTP, all my site files are in there, and a folder I called “blog.” In the blog folder are all the WP files and folders.

    Again, not sure if this is relevant, but when I went into cPanel in GoDaddy and clicked “WordPress” (which I have never clicked before) I got this error message:

    Fatal error: Call to a member function get_var() on a non-object in /home/alexjberger/public_html/home/alexjberger/public_html/wordpress/wp-content/deleteme.342b8b10b69f46beb2a557236fdd590b.php(16) : eval()'d code on line 1

    I did read a suggestion to comment out global $dlm_download from content-download.php in themes to fix this error, but I don’t see this file.

    I was able to drag a file into FTP and I see it in the uploads folder and in cPanel file manager, but it’s not in my media library. Maybe that’s a clue?

    When I look at the URL for the corrupted images in Media Library, the filepath is correct (/wp-content/uploads/filename.jpg).

    Godaddy hosts me.
    WordPress 4.7.2 running Twenty Seventeen theme.
    All plugins updated (Ninja Forms, Scroll Progress Bar, WP Recipe maker).
    My domain:
    My WP blog:

    I have tried to fix and research this issue myself to the best of my abilities, so I hope this information helps. Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @littleinu
    i faced the same issue not long ago, all of my images are corrupted and whatever i uploaded looked broken..
    (not completely the same issue, but somehow like yours)
    i googled and i came up with this solution :

    function parallelize_hostnames($url, $id) {
     $hostname = par_get_hostname($url);
     $url =  str_replace(parse_url(get_bloginfo('url'), PHP_URL_HOST), $hostname, $url);
     return $url;
    function par_get_hostname($name) {
     //add your subdomains below, as many as you want.
     $subdomains = array('');
     $host = abs(crc32(basename($name)) % count($subdomains));
     $hostname = $subdomains[$host];
     return $hostname;
    add_filter('wp_get_attachment_url', 'parallelize_hostnames', 10, 2);

    1 – add this into your functions.php file
    from Dashboard > Appearance > Editor > Functions.php
    2 – complete answer can be found here :

    Masoud .

    • This reply was modified 4 years, 7 months ago by Masoud.
    Thread Starter littleinu


    I wish that would have worked. It didn’t. Thanks though!

    Thread Starter littleinu


    Is there any possible way to get help on this? I don’t understand how I can use my site without images, and there is no support.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Corrupted images in Media Library’ is closed to new replies.