• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Feature
    • Option to inser width="" and height="" attributes on images

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Option to inser width="" and height="" attributes on images

    • Issue Tools
      • View Changes
    1. issueid=6258 October 4, 2021 3:56 AM
      mazzly mazzly is offline
      Junior Member
      Option to inser width="" and height="" attributes on images

      Hi,

      Currently it seems that img elements are inserted with a style-property that only defines the width (why not height?).

      Page Speed Insights says that it would be good for the cumulative layout shift if the images had the correct width="" and height="" attrs set on them.

      (btw, it seems also that the Pagespeed modules insert_image_dimensions-filter doesn't work when only width is set on the style..)

      I'm not 100% sure how this fits in with the current "lazy loading" functionality, but it is usually quite good to have the image dimensions set in the markup so that the page doesn't have to re-flow. (This is nowadays a ranking factor for SEO)

      Could we get an option to insert the img attrs for width and height? I'm assuming that the vw system knows them at the time of rendering.

      Cheers
      //Jonathan
    Issue Details
    Issue Number 6258
    Issue Type Feature
    Project VaultWiki 4.x Series
    Category Images / Icons
    Status Implemented
    Priority 7 - Minor Features / Enhancements
    Suggested Version 4.1.2
    Implemented Version 4.1.3
    Milestone (none)
    Software DependencyAny
    License TypePaid
    Votes for this feature 0
    Votes against this feature 0
    Attachments 0
    Assigned Users (none)
    Tags Images, xenforo




    1. October 4, 2021 10:05 AM
      pegasus pegasus is offline
      VaultWiki Team
      Height is not specified in the style properties due to the effect CSS-height has on responsiveness. Instead, a fluid padding is used to size the height, because padding is oddly a function of the browser width.

      If you have the lazy-loading settings at their default values, you should not have any re-flow / cumulative layout shift. If lazy-loading is turned on, there are actually no images (except loading indicators) on the page at render time. All the loading indicators are in pre-sized containers (divs) based on the expected dimensions of the final images, and all images are inserted into these placeholder containers later by the lazy loader.

      For the next release, I have updated the lazy-loader so that after the images are loaded in, the width and height attributes (not style-height) are also set when they get inserted. I don't think this really makes any functional difference, aside from completeness. At first inspection, doing it this way does not appear to negatively affect responsiveness.

      I'm pretty sure that PageSpeed will still complain because I doubt it scrolls the page / waits for the lazy loader to make its analysis.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 2:51 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.