• Resolved ecgull207

    (@ecgull207)


    This may be an issue with WordPress itself, but I get and HTTP error when trying to upload certain images. I spent over an hour on the phone with GoDaddy customer support since WordPress’ support line is a dead end with nobody on the other end. I tried uploading through an FTP client and it still wouldn’t work. He came to the conclusion that it just doesn’t like those particular images for some reason (I tried changing dimensions, resolution, file type, etc to no avail) or it was an issue with my theme of plugins. I disabled my plugins and changed my theme and was able to upload SOME of the images, but others still get an HTTP error (I activated the plugins again and changed the theme back and there seems to be no issue with the images I was able to upload after deactivating the plugins and changing the theme so I don’t think that is the issue) however the color looks off on these images upon upload and on some the color became posterized and all out of whack.

    Help ASAP would be appreciated. Need to find an internship within the next couple of weeks so my site has to look polished. Thanks.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Add this to your theme’s function.php file.

    add_filter( 'wp_image_editors', 'change_graphic_lib' );
    
    function change_graphic_lib($array) {
     return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
     }

    That has typically worked for just about every other user that I’ve seen.

    Thread Starter ecgull207

    (@ecgull207)

    How do I locate the theme’s function.php file?

    Thread Starter ecgull207

    (@ecgull207)

    I am in the editor and it doesn’t look like my theme has a functions.php file. It is not listed on the right with the other php files.

    Thread Starter ecgull207

    (@ecgull207)

    Never mind I found it.

    Thread Starter ecgull207

    (@ecgull207)

    Wow it worked thanks a ton! Been trying to figure this out forever! Although the colors are still off and the other images are still posterized.

    Sorry, I didn’t see your posts until now. I’m glad that that worked. Is the color off on the one you have posted since adding that bit of code? Only reason I ask is to see if it would help to delete and reupload one to see if it reverts it back to normal color. And what extension are you using for the images? (jpg, pdf, etc.)

    Thread Starter ecgull207

    (@ecgull207)

    It’s ok, I appreciate the response. They were uploading off color before I added the code, and some of the images are just images without the text that is in the original file. I tried deleting and reuploading. I checked the files on my computer and they look normal there. They are jpgs.

    I hope you understand what all of this means, in which case it should fix your problem.
    If you currently use Adobe to edit images, something like Photoshop, you need to edit the color profile it is saved as. Adobe tends to automatically save as Adobe RGB, but with web browsers it tends to sway more towards needing sRGB. Here is an excerpt I copied from another website that can explain it much better than I can. I would probably end up rambling lol. ??

    Color Profiles

    If the colors in your uploaded images appear different from the originals, make sure you are saving your images in sRGB before you upload them. The sRGB color profile will work the best for resized images on the WordPress.com servers. Keep in mind that some sRGB images still may have slight shifts in color when they are resized on the server. If you want to make sure your colors are as close as possible to the original, upload your images in the same dimensions that you’d like to display them on your blog and insert them at full size with no image dimensions.

    sRGB is a standard default color profile for the web and is the most common color space used by web servers today. Check out this explanation on sRGB vs. Adobe RGB for further details on color profiles.

    The best way to do that, if you don’t already know, is to go to.. File –> Save for Web and Devices –> Then Tick the Convert to sRGB tab. This is fully assuming you are using Adobe Photoshop or any other Adobe program for image editing or compressing. This should fix the color and text layered image problem as well. I’m assuming that you are flattening the image when adding text, correct? I’m not sure if that would make a huge deal, but I have had it not save the text over the image if I forget to flatten before doing so. Of course, just BE SURE to have an original saved first, because obviously flattening an image and then saving could prohibit your ability to ever revert it.

    To be honest, if you do not use Adobe, I am not sure how you could attempt this just to see if it is in fact the right fix for your problem. Also, I may have typed this all for no reason if you already knew all of this, so sorry for that too. I’m really baffled at what could be causing this if this isn’t the problem, just let me know so I know what to tell others if they have the same type of problem.

    Hi Joey, I am having WordPress 4.4.4 (Virtue Theme). Since last couple of hours I am getting HTTP error while uploading images (.JPG). And I also noticing that I am not being allowed to update any plugins, I get an error saying Update plugin failed.

    I added the code in the functions.php file (in Appearance -> Editor -> functions.php ->Update file), but with no luck. I do not have a file named function.php. I am really struggling with this.

    Can you kindly let me know if you have any suggestions to help resolve this error. I really appreciate any help.

    You probably do have a functions.php file within your theme’s code editor. The only thing that scares me is how easy it can be to mess up your entire website with one line of code out of place. I would consider installing a plug-in to try code out such as Simple Custom CSS, that plug-in overrides any code within your theme. If you don’t know much about CSS I would push you away from editing your actual theme’s code, unless you know how to do a child theme to edit and try stuff out. Just go for the plug-in and see if it fixes your problem.

    I’d say to that it could be a plug-in itself messing things up. Try disabling them all and see if things start working again. Then re-activate on-by-one to see if the problem persists.

    Thread Starter ecgull207

    (@ecgull207)

    Thanks Joey I will give that a go later this afternoon and I understand what you are talking about as far as color profiles. I have not been flattening the images, for that very reason of not being able to edit it later on, but I can do as you said and save a copy file to flatten. I usually use Illustrator for most of my work and am not sure how to flatten Illustrator layers, but I’m sure I can Google it and figure it out. I will let you know how it goes. Thanks again!

    Thread Starter ecgull207

    (@ecgull207)

    You have been a great help, thanks again Joey! Problems solved!

    Ive been trying to figure out why I kept getting the html code error – when I created a debug file – it said it was timing out – max execution time of 30 secs exceeded. So I changed coding in access file and even tried a plugin but still got the error. So I came across this feed & I put your code in Joey and now it is working. What does it actually do the code? Thanks sooo much I have been sat here til 4am last night and today, thank goodness for that!! thanks

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘HTTP Error when trying to upload certain images.’ is closed to new replies.