Images Breaking when Class includes ‘wp-image’

  • Unknown's avatar

    I feel this may be a basic issue or another ‘check your plugins dummy’ question,
    but images on the site I manage have all broken recently thanks to what appears
    to be incompatible class data.

    If I use the standard ‘Add Media/Insert Into Post’ method of injecting images,
    the images show up fine in the Visual editor but do not appear on the site;
    instead I get image skeletons. Also, older articles that used to show the images
    now show the same blank instead of the graphic. If, however, I delete the
    ‘wp-image’ element from the Class definition, the graphics will post correctly.

    EXAMPLE PAGE:

    {TEST} Check Page for Photo Errors


    EXAMPLE CODE:
    ======================
    WORKING IMAGE

    BROKEN IMAGE

    ======================

    You can see on this page, with the exact same graphic, one injection is broken
    and the other is working fine. The only difference is that the ‘wp-image’
    portion has been removed from the Class instructions.

    When I look into the Source HTML for the published page, I see a bunch of extra
    metadata in the call for the broken image, less of that for the working
    image. I believe it is Jetpack that is handling the Class and Metadata process?
    (There’s an earlier call for Jetpack Open Graph Tags in the source.)

    The site is on WordPress 5.2.2 running Twenty Eleven theme; Jetpack version
    7.6. (I asked Jetpack Support for help, they couldn’t really identify it as a Jetpack problem; I’m not seeing any other active plugin installed that’s specific to CSS controls but there’s always something…)

    Does this sound like a familiar issue, and is there a way to repair this aside
    from manually deleting the Class data line from posts?

  • Unknown's avatar

    (Sorry, I didn’t include the excerpt of WordPress code properly and it punched through the images … hey, they work on THIS WP site, at least. Below is the snippet again from my site’s WP entry content.)

    ===

    WORKING IMAGE
    <img src="http://rsca.org/wp-content/uploads/2019/04/Rowing-Promo.jpg" alt="" width="1005" height="565" class="aligncenter size-full" />
    
    BROKEN IMAGE
    <img src="http://rsca.org/wp-content/uploads/2019/04/Rowing-Promo.jpg" alt="" width="1005" height="565" class="aligncenter size-full wp-image-6925" />
    

    And for fun, here’s the resulting source code on the page:
    view-source:https://www.rsca.org/test-page-for-photo-errors/


    WORKING IMAGE

    BROKEN IMAGE

    <!– .entry-content –>

  • The topic ‘Images Breaking when Class includes ‘wp-image’’ is closed to new replies.