WordPress.org

Ready to get started?Download WordPress

Forums

Image Upload/Edit Borked in 2.7 (22 posts)

  1. jamesisin
    Member
    Posted 5 years ago #

    Uploading images is a giant pain now (since I've moved to 2.7) and I would really like to see this fixed. I would love to fix it myself if I only knew the correct path. Otherwise this is a bug and WP will have to address it.

    Uploading images (using either the browser uploader or the flash uploader, using several browsers on several operating systems) will not allow changes to the image display size. I am restricted to only using a full-sized image. Once uploaded I am able to edit the image and reduce the image size, but I am still not able to set it up to create a proper thumbnail and generate the usual link.

    All of this can be done manually in the HTML side of the editor.

    Here is an example of an image I have been working on:

    http://www.soundunreason.com/InkWell/?p=673

    I have fixed this page and all four of its images. The original code for the uploaded and WP edited image was thus:

    [caption id="attachment_684" align="aligncenter" width="252" caption="Edit Filter: After"]<img class="size-full wp-image-684 " title="editfilter-amarok2" src="http://www.soundunreason.com/InkWell/wp-content/uploads/2009/01/editfilter-amarok2.png" alt="Edit Filter: After" width="252" height="220" />[/caption]
    <p style="text-align: center;"></p>

    I was able to recode the HTML to fix the problems:

    [caption id="attachment_684" align="aligncenter" width="300" caption="Edit Filter: After"]<a href="http://www.soundunreason.com/InkWell/wp-content/uploads/2009/01/editfilter-amarok2.png" target="_blank"><img class="size-medium wp-image-684 " title="editfilter-amarok2" src="http://www.soundunreason.com/InkWell/wp-content/uploads/2009/01/editfilter-amarok2.png" alt="Edit Filter: After" width="300" /></a>[/caption]
    <p style="text-align: center;"></p>

    Essentially I am emulating the HTML from images I uploaded before 2.7 was released. As you can see WP is leaving out some important information. Further, the ability to use anything but the full-sized radio button (ie: thumbnail) is completely unavailable in both the uploaders and in the edit dialog.

    (The thumbnails are generated through rescaling at page rendering and are never stored on my server, so you can exclude a permissions issue.)

    Something changed in 2.7 which has completely broken this functionality. What has changed and what is the official solution?

  2. jamesisin
    Member
    Posted 5 years ago #

    Incidentally, I have done all the basic troubleshooting. As I stated above I have tried both uploders which made no difference. Also, I have tried this will ALL plugins disabled. (I use the default theme so that should not be an issue.)

    I am running this on a Windows 2003 server with PHP5 and MySql (through IIS).

  3. Chris_K
    Member
    Posted 5 years ago #

    I am running this on a Windows 2003 server [...]

    I don't have an answer but wanted to hilite that tidbit in the event someone more knowledgeable about WordPress on Windows happens to see the thread.

  4. jamesisin
    Member
    Posted 5 years ago #

    Thanks. I'll take all the help I can get.

  5. jamesisin
    Member
    Posted 5 years ago #

    C'mon. I know I'm not the only person seeing this problem. Am I really the only person uploading images, wishing for thumbnails, and using 2.7?

    Surely, somebody must know why this is happening. I have poured over the documentation and have not seen any mention of changes which might effect this functionality. I really want to fix this.

  6. jamespashton
    Member
    Posted 5 years ago #

    i have the problem too, it's been bugging me for a month and everything that I've done has not worked.

  7. jamesisin
    Member
    Posted 5 years ago #

    jamespashton - I think it's effecting a lot of folks.

    What is your WP setup/system like?

    Do the code changes I have posted above work for you also?

  8. Kenv
    Member
    Posted 5 years ago #

    In the dashboard > settings > media, decide what size you want your thumbnails to be. I have set the thumbnail size to “height 100” and checked the box to crop to exact size. If you do not want to use that option you may want to over ride the “default” medium 650x480 & large 1024x1024 maximum sizes

    Click the link to insert an image into the HTML editor. If you are uploading an image you should be be given the option to insert it as a thumbnail, small, medium, large or Full Size image. If you are selecting an image from the media library, all images have a “show” link to the right. Click the “show” link and you should have the same option to select thumbnail, small, medium, large or Full Size image.

    I am having thumbnail problems but my issue has to do with thumbnail alignment. Haven't figured it out yet.

    Hummm, I re-read your post, so what I am said may be useless for you. prior to uploading, I have always sized/resized the image to the dimensions I wanted to display when the thumbnail is clicked .

    I am running linux~opensuse 10.3, Firefox and WordPress 2.7 with K2
    http://foodblog.jkvetter.com

  9. jamesisin
    Member
    Posted 5 years ago #

    Kenv - Yes, useless. Sorry. The problem we are seeing is that the thumbnail option (in both of the areas mentioned in your second paragraph) is greyed out and not available for use. We have to alter the code to get it to behave as expected. (For my part, the Settings > Media information is correctly set.)

  10. jamesisin
    Member
    Posted 5 years ago #

    Anybody have any news on this exciting problem?

  11. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Is the thumbnail file even generated in the uploads folder? If not, then maybe you're missing the GD libraries in PHP, or something else.

    It's extremely hard to tell what's wrong when you're using IIS. WordPress was written with a normal Apache stack in mind, IIS doesn't do things like a normal web server should.

  12. jamesisin
    Member
    Posted 5 years ago #

    There are no thumbnails. Never have been (even when this problem didn't exist). Thumbnails are created on the fly by the browser, I think, based on the actual image file. This was broken and represents a change from previous versions of WP. Something changed.

  13. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    No, thumbnails are NOT created on the fly by the browser. When you upload a pic, and everything works correctly, WordPress itself will create a thumbnail image, a "medium" sized image, and a "large" sized image (if the dimensions are okay), which it stores in files alongside the original image in the uploads directory. Why? Because browser resizing a) looks awful and b) takes more bandwidth.

    If you're not getting 3 or 4 files created for an image upload, then something is wrong with your server. Probably the GD library is not enabled in PHP's ini file.

    This has been the case ever since WP 2.5. Even before that, it created smaller versions of images, just not so many of them for various uses. The "GD" library is the PHP graphics library, which allows it to do high quality image resizing and cropping, unlike browsers do.

  14. jamesisin
    Member
    Posted 5 years ago #

    Hmmm... I'd like to see an example post, from one of the sites you've created, where the image was uploaded using the standard method. None of my image including posts has ever had any additional files created at upload time. When I look at the code for an image-including post there is no mention of any file aside from the main image file (no thumbnail image URL, for instance). Can you provide a link for comparison?

    I have posts with images from before 2.5 that do not have all of these additional images. My image repository contains only the original uploaded image file. Here is about the oldest post I have containing an image:

    http://www.soundunreason.com/InkWell/?p=39

    It was published 26 July 2008. If you look at the code for that image it is like the fixed version above. (You will note there is only one image URL and no mention of a specific thumbnail file.)

    As to the GD library you mention, I have never been able to find any documentation on the WP site which makes any mention of this library. I have gone over all of the installation procedures and have ensured that I have always followed all of their instructions to the letter. Perhaps I have this; perhaps I do not. PHP is not my area.

    I am guessing the resizing occurs at the browser because of the URL issue I have just talked about. Further, I can right-click on one of my thumbnails and choose "Open Image (..." and the image will open without having to load anything. (Again, you can test this on the links I have thus far provided.) Wherever the resizing occurs, there is clearly only one file stored on the server.

  15. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Okay, an example then.

    Post:
    http://ottodestruct.com/blog/2008/10/16/advertising-and-gaming/

    Image in the post (generated by WP):
    http://ottodestruct.com/blog/wp-content/uploads/2008/10/burnoutobama800_screen1-300x200.jpg

    Original image uploaded:
    http://ottodestruct.com/blog/wp-content/uploads/2008/10/burnoutobama800_screen1.jpg

    Thumbnail generated by WP:
    http://ottodestruct.com/blog/wp-content/uploads/2008/10/burnoutobama800_screen1-150x100.jpg

    All these images were generated from one upload. Really. I'm not making this up, and I do know what I'm talking about here.

    I have posts with images from before 2.5 that do not have all of these additional images.

    Pre-2.5 did not act the same way as post-2.5 does. It did generate one smaller image, but not multiple ones.

    As to the GD library you mention, I have never been able to find any documentation on the WP site which makes any mention of this library.

    It's not in the documentation, because 99% of PHP installations activate this library by default. If you install PHP, you usually get this for free, it's not something that's really thought to mention, much like support for other default things that's assumed.

    In your PHP.INI file, do you have extension=php_gd2.dll? Or is that commented out?

    Enable the GD library. Then it will probably work properly (for new uploads only, of course).

    I am guessing...

    I am not. ;-)

  16. jamesisin
    Member
    Posted 5 years ago #

    That line does exist but it is commented out. I will uncomment and report back.

    (I never doubted you're knowledge; I was only trying to wedge my experience into what had been said.)

  17. jamesisin
    Member
    Posted 5 years ago #

    Ok, I've sorted all the issues out and will create a post later to divulge in totality my findings.

    I do have one question for you: why do I want additional files created when the on-the-fly thumbnail WP creates for the post (not on the server) looks perfect?

  18. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    I do have one question for you: why do I want additional files created when the on-the-fly thumbnail WP creates for the post (not on the server) looks perfect?

    Because it doesn't look perfect. On-the-fly resized images look awful in most people's web browsers, because web browsers don't do good resize operations. Also, when you have the web browser doing it, then it has to download this very large image which it then resizes to be very small. That takes a lot of bandwidth. Better to have a small version that they can get instead.

    And, the thumbnail created by WordPress does not necessarily have to be the same dimensions as the picture itself. It can crop images to create thumbnails too, if you have that option selected.

  19. jamesisin
    Member
    Posted 5 years ago #

    Well, I've tested it in Opera and Firefox on Ubuntu; Opera, Firefox, and IE (ack) on Windows; and Opera, Firefox, and Safari on my Mac. Only IE (not surprising) and Firefox (on Windows and Ubuntu) show any difference, and that difference is markedly subtle. I'll test a bit more of how the WP generated tn's work before I make my final decision, but thus far I'm leaning toward saving the space and backup on my server.

    Is there a way to tell WP not to generate the additional files?

  20. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    No. However, having the smaller images on your server saves a TON of bandwidth. And bandwidth is more expensive. Compare your total page sizes with and without the thumbs generated and you'll see the substantial difference. Smaller pages = quicker load time as well.

  21. jamesisin
    Member
    Posted 5 years ago #

    Hahaha, that assumes anyone besides me is viewing my blog pages. I appreciate your confidence in my work. Thanks for all your help on this one.

  22. Melton Cartes
    Member
    Posted 5 years ago #

    I located my PHP.INI file in PHP5 for my MAMP and couldn't find "extension=php_gd2.dll."

    I too have a grayed out Large button in my "Add an image" window.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags