WordPress.org

Support

Support » Themes and Templates » [Resolved] Since 3.1.5: Attachments Upload But Display as 1×1 pixel

[Resolved] Since 3.1.5: Attachments Upload But Display as 1×1 pixel

  • Since upgrading to Customizr 3.1.5 my Media Library has stopped working for new images while old images work fine. Something isn’t right about how images are being identified during upload, but I’ve had no luck figuring it out.

    When I attempt to upload any image (and I’ve tried many, including ones successfully uploaded in the past) the process works without errors, the files appear in the correct wp-content/uploads folder, and the image even displays when you select Edit from the Media Library.

    But when you choose View Attachment Page in the Media Library it brings up a page with no visible image. Viewing the source on that page shows that the height and width tags on the image have been set to 1.

    Then when you return to the Media Library there is no visible thumbnail image for the file that was just uploaded. Again, viewing source shows the image is there and linked, but displaying as 1×1 pixel.

    Finally, choosing Edit Image from the Edit Media page reports the error “Image data does not exist. Please re-upload the image.”

    Does anyone have any ideas? I’ve noticed at least one other thread with similar problems of 1×1 images reported, but that person’s solution doesn’t apply in this case.

    Here’s the URL of an attachment page showing the problem:

    ACAwebinarScreenshot2

    FYI I use a custom child theme, but I’ve tested with just Customizr alone and got the same behavior. I’ve also tested disabling all plugins one by one and had no luck.

    Can anyone offer any ideas?

    Thanks,
    Joel Risberg

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author nikeo
    Participant

    @nikeo

    Pretty weird indeed.
    I have done some testing using your image and it works just fine for me.

    Here are a link that might help :
    http://stackoverflow.com/questions/19966112/wordpress-featured-images-all-showing-with-1px-width-and-1px-height

    Thanks for reporting this

    Some follow-up info:

    Changing to the Twenty Fourteen theme completely fixes this problem.

    Things that don’t help: re-uploading a clean copy of the Customizr theme, disabling child theme, disabling all plugin-ins, or forcing usage of GD image tools instead of ImageMagick.

    I realize it isn’t affecting everyone, but the core cause of it seems to be in a recent change to Customizr.

    More clues:

    I was getting this PHP warning when using the Regenerate Thumbnails plugin:
    PHP Warning: imagejpeg(/xxxx/wp-content/uploads/2013/09/family-3-mixed-fun-kid-e1378507266679-1717×500.jpg): failed to open stream: Permission denied in /xxxx/wp-includes/class-wp-image-editor.php on line 387, referer: http://www.cohealthinfo.com/wp-admin/tools.php?page=regenerate-thumbnails

    Changing to a different thumbnail regenerator stopped the PHP warnings and seemed to actually write the images fine, but then every JPG image on my site changed to display as a 1×1 pixel (PNGs were unaffected). The only way to fix this was temporarily changing to the Twenty Fourteen theme, regenerating, then switching back to Customizr.

    Is this at all helpful?

    Thanks,
    Joel Risberg

    FYI: I think the PNG thing was a red herring. Those images happened to be smaller icons and were skipped when resizing, so the problem doesn’t seem to be limited to JPGs.

    Thanks,
    Joel

    After many hours of dead ends I think I have it: I had disabled the theme’s new Retina support due to the huge wave of 404s it generated in my logs. Re-enabling it fixed the problem.

    So I’ll mark this resolved from my end, but this seems to indicate that there’s a flaw in the metadata logic when retina support is disabled.

    Thanks for your help,
    Joel

    pacific222
    Participant

    @pacific222

    I found the same problem with using Customizr theme and not being able to upload images from computer into a new post. Well, the image WOULD upload, but we couldn’t see it. The image would have a 1×1 image or, width=”1″ height=”1″ so would not be visable. Something is resizing it to the 1 x 1 pixel size.

    I changed the Customizr theme to 2014 theme, and was able to upload and insert images with no problem. Switching back to Customizr the problem returned.

    The trick is to turn off the Retina support and then re-enable it. (Under Theme Settings / Images / Enable/disable retina support – this should be checked, if it is already, uncheck it, save, and then check the box again, and save)

    Many thanks to jrisberg for his sleuthing on this problem!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Since 3.1.5: Attachments Upload But Display as 1×1 pixel’ is closed to new replies.