Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. lazyload attributes saved into page content

lazyload attributes saved into page content

Scheduled Pinned Locked Moved Bug Reports
7 Posts 2 Posters 288 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qua7
    wrote on last edited by
    #1

    after one of the recent updates on my site the cover image and the first project thumbnail on the homepage were not displayed when the page was loaded directly (in all browsers, on desktop and mobile). However, they did appear correctly when navigating to the homepage from a subpage (via AJAX navigation), and they also look fine in the Laytheme editor.

    Claude found the problem and gave me a script to solve the problem for the moment.

    <script>
    document.addEventListener("DOMContentLoaded", function () {
    document.querySelectorAll("img[data-src]").forEach(function (img) {
    if (img.src.indexOf("data:image") === 0) {
    img.removeAttribute("sizes");
    img.src = img.getAttribute("data-src");
    }
    });
    });
    </script>

    But I guess it is a bug?
    Thanks in advance for looking into this.

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qua7
      wrote on last edited by
      #2

      another problem: display of covers in mobile seems corrupted - some white space above cover is shown

      1 Reply Last reply
      0
      • arminunruhA Offline
        arminunruhA Offline
        arminunruh
        Global Moderator
        wrote last edited by
        #3

        hey, do you have a link?

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qua7
          wrote last edited by qua7
          #4

          @arminunruh
          corporatefotografie.com

          repair worked with

          <script>
          document.addEventListener("DOMContentLoaded", function () {
          document.querySelectorAll("img[data-src]").forEach(function (img) {
          if (img.src.indexOf("data:image") === 0) {
          img.removeAttribute("sizes");
          img.src = img.getAttribute("data-src");
          }
          });
          });
          </script>

          and with

          @media (max-width: 600px){
          .cover-region {
          top: 0 !important;
          }
          }

          but I guess those were bugs?

          1 Reply Last reply
          0
          • arminunruhA Offline
            arminunruhA Offline
            arminunruh
            Global Moderator
            wrote last edited by
            #5

            thanks a lot!

            i did try to fix this with the update i released yesterday.
            you can try and see if that update fixed it for you.

            if you like you can also turn off updates in lay options -> disable updates

            you can find the setting by searching for it in the search bar.

            1 Reply Last reply
            0
            • Q Offline
              Q Offline
              qua7
              wrote last edited by
              #6

              thanks. That solved the first problem, but not the second: covers in mobile still have some free space above them. I fixed it with
              @media (max-width: 600px) {
              .cover-region {
              top: 0 !important;
              }
              }

              1 Reply Last reply
              0
              • arminunruhA Offline
                arminunruhA Offline
                arminunruh
                Global Moderator
                wrote last edited by
                #7

                hey!

                grafik.png

                your website uses the mobile menubar.
                which you can show/hide in customize -> mobile -> mobile menu bar -> hide

                This bar is overlaying the top of your mobile website. Usually, this bar pushes the whole layout down which is correct

                grafik.png

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                We also code custom websites or bespoke Lay features. Drop me a line at info@laytheme.com or check out my work at arminunruh.com.

                Want to support my work? paypal.me/arminunruh

                Before you post:
                1. When using a WordPress Cache plugin, disable it or clear your cache.
                2. Update Lay Theme and all Lay Theme Addons
                3. Disable all Plugins
                4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                This often solves issues you might run into

                When you post:
                1. Post a link to where the problem is
                2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                Online Users
                Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                laytheme.com
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Recent
                • Tags
                • Popular
                • Users
                • Search