• I am new to WP and this is a brand new installation. I first tried with version 3.8.1 and had problems when trying to include images in posts or elsewhere like a featured image on a page. Examining the page source revealed that the correct image link was present, but that the width and height were each set to 1, so the image was there, but it was a single pixel dot.

    Searching the forums revealed many reports of similar problems with 3.8.1, but not solutions, so I decided to revert to 3.8. After removing the wordpress directory and database from my site, I started over and did a fresh install of version 3.8. Without doing anything else, I tried creating a post and inserting an image into it. At this point, I experienced a new problem in that when I tried to upload an image, I got an error message telling me that it had failed and to try again later. I tried four times with the same result. I then switched to the media directory and saw that all four images were in-fact there and appeared to be OK.

    Just to be safe though, I deleted all four of those, then did a fresh upload of the same image from the media library page. This time it worked with no error message, so I went back to the Posts page and tried to add the image to my post. It had the same problem as I was experiencing in 3.8.1.

    You can see an example here: http://birchtreebooks.com/
    This WP site is version 3.8 and is hosted on a 1and1.com shared server and the version of PHP I’m using is 5.4.

    Look at the second post. There is supposed to be an image at the end of the line and if you look really close, you’ll see a single pixel dot. Using the URL to the image from the page source will show that the image is present and displayable.

    I also noticed that when in the media library page, if I clicked on “View” for the uploaded image, I got the following error message:

    “Warning: Illegal string offset ‘width’ in /homepages/10/d160957291/htdocs/arttouch_wp/wp-content/themes/twentyfourteen/image.php on line 31”

    I got an identical message about ‘height’.

    Examining the code referenced in this message showed that it was supposed to fill in the correct width and height value with $metadata[‘width’] and the same for height. It is apparently not getting valid values for these entries. I believe that is probably the same thing that is causing the problem with images in posts.

    In previous experiments, I used the text mode of the Post editor to change the width and height dimensions for the image, and also to just remove those settings and in both cases, it allowed the image to be displayed, but obviously that is not a solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter bobHeath

    (@bobheath)

    Since I originally posted this as a problem that appears in version 3.8, I got an email telling me that my site had been automatically updated to 3.8.1. I tried uploading another image and including it in a post to verify that the problem was still there. It is, but I noticed something else:

    When I upload an image by dragging and dropping it, it initially fills in a progress bar as it loads, then it displays the message “Crunching…”. It just stays on that screen with that message until I click another selection in the menu. I’m brand new to WP, so I’m not sure exactly what’s supposed to happen here, but that seemed a bit odd.

    I also tried uploading with the browser uploader. After I click upload, it delays for a moment, while it uploads I guess, then switches to a completely blank screen. That seems equally odd.

    When I look in the Media Library, the files are there which initially lead me to believe that the upload had worked, but now I’m not so sure. Maybe it isn’t finishing the job and that’s why it can’t figure out the correct size of the image to insert later.

    Hmmm… The link actually does point to an image and if I go to the URL an image does show up. Perhaps the image is too large for WordPress to handle? I would suggest reducing the pixel size down to something more web friendly like 1024×768 at the large end. Right now your image is a huge 4368 x 2912 pixels and 811 Kb and the WordPress crunching algorithim may be timing out due to the huge size and thus the image meta data isn’t captured and thus WordPress never really “gets” the actual media file data it needs to show the image.

    Thread Starter bobHeath

    (@bobheath)

    Thanks bemdesign. I believe you are correct. After my last post, I changed my search to look for posts about problems with uploading of images and found other hints that the image dimensions might be the problem. So, I tried again with smaller images (1024 on the long side as you suggest) and it worked. It surprises me that there isn’t a warning when the post-processing fails to complete, but I agree with you that that is apparently what is happening.

    Now that I’ve done this with a smaller file, I see what is supposed to happen when a file is successfully uploaded. Now I know what to watch for so I can get back to work on creating my new website.

    Thanks for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘images used in posts are shown with size 1×1’ is closed to new replies.