• Resolved johnnyivan

    (@johnnyivan)


    Hi All,

    It’s very strange editing text and markup in WordPress. The ‘text’ view in which I can edit the HTML will show a nice clean image tag with just the basics in it, but when I view the source from the resulting webpage, it’s got acres of code in it.

    – Is that normal?
    – Does it help the system to keep track of what assets are being used?
    – And does the system update the img tag code if I make changes to the image within the media library?

    (I suspect that there a fancier editor which allows me to see what’s really going in in the HTML)

    Thanks,
    John

    • This topic was modified 6 years, 8 months ago by johnnyivan.
Viewing 14 replies - 1 through 14 (of 14 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What do you mean? Are you talking about the srcset tags?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What do you mean? Are you talking about the srcset tags?

    Thread Starter johnnyivan

    (@johnnyivan)

    Hi Steve,
    I mean the <img> tag. Here’s one in the editor:

    <img class="aligncenter size-full wp-image-1095" src="https://johnwhiteillustrator.com/wordpress/wp-content/uploads/2018/02/treasureireland_fb-game-view.jpg" alt="irelandtown facebook game interface detail" width="630" height="415" />

    Not too bad. But if I ‘View Source’ or inspect the HTML in my browser on the front end of the site it looks like this:

    ??<img data-attachment-id="1095" data-permalink="https://johnwhiteillustrator.com/wordpress/portfolio/game-irelandtown/treasureireland_fb-game-view/" data-orig-file="https://i1.wp.com/johnwhiteillustrator.com/wordpress/wp-content/uploads/2018/02/treasureireland_fb-game-view.jpg?fit=630%2C415" data-orig-size="630,415" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="treasureireland_fb-game-view" data-image-description="" data-medium-file="https://i1.wp.com/johnwhiteillustrator.com/wordpress/wp-content/uploads/2018/02/treasureireland_fb-game-view.jpg?fit=300%2C198" data-large-file="https://i1.wp.com/johnwhiteillustrator.com/wordpress/wp-content/uploads/2018/02/treasureireland_fb-game-view.jpg?fit=630%2C415" class="aligncenter size-full wp-image-1095" src="https://i1.wp.com/johnwhiteillustrator.com/wordpress/wp-content/uploads/2018/02/treasureireland_fb-game-view.jpg?resize=630%2C415" alt="irelandtown facebook game interface detail" width="630" height="415" srcset="https://i1.wp.com/johnwhiteillustrator.com/wordpress/wp-content/uploads/2018/02/treasureireland_fb-game-view.jpg?w=630 630w, https://i1.wp.com/johnwhiteillustrator.com/wordpress/wp-content/uploads/2018/02/treasureireland_fb-game-view.jpg?resize=300%2C198 300w" sizes="(max-width: 630px) 100vw, 630px" data-recalc-dims="1" />

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    That’s the srcset plus Jetpack’s Photon image CDN (xx.wp.com) links.

    Thread Starter johnnyivan

    (@johnnyivan)

    Good god.

    Thread Starter johnnyivan

    (@johnnyivan)

    Is that actually supposed to optimise my site?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Yes. Your images are being served, in a responsive fashion, from a CDN optimized to server images.

    If you don’t want that, you can disable Jetpack’s Photon service.

    Thread Starter johnnyivan

    (@johnnyivan)

    I might try it, Steve. My site is crawling, even after my host moved it to another server.

    I also switched off ‘Lazy Load Images’ which seemed to be making viewing the pages less enjoyable.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Yeah, I’m not a fan of how lazy load looks.

    Photon should speed up your site.

    Thread Starter johnnyivan

    (@johnnyivan)

    Will there be cacheing issues tough, with my site’ images being served from elsewhere?

    BTW: I don’t see ‘Photon’ in my Jetpack dashboard and settings. The closest thing I see is:

    Jetpack > Settings > ?Writing >? Speed up your site:

    ‘Serve images from our servers’
    and
    ‘Lazy load images’

    I think I do remember hearing about ‘Photon’ before, but don’t see it now.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    No caching issues. That’s why one uses a CDN.

    Thread Starter johnnyivan

    (@johnnyivan)

    Hmm. From what I read, you may need to re-upload an image that you need to change with a different name though, as they’re ‘unpurgeable’.

    https://jetpack.com/support/photon/#questions-and-answers

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    True. That’s a downside of the Photon service.

    Thread Starter johnnyivan

    (@johnnyivan)

    I think the slow speed of this current site is more about the system itself or my host. It drags more than any site I’ve ever built, except for 1 old Joomla site which I think was hacked.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Huge amount of code in image tags’ is closed to new replies.