Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Publii is fast, but this can make it faster

  • #3713
    Avatar photo[anonymous]

    Publii is very fast and im proud to use this platform for our blog.

    An issue many webmasters face is that when you use video on your site, it really slows down the loading and increases your page size substantially.

    A publii site on a fast server can load in half a second.

    A publii site with a video embeded can take 2.5 seconds.

    Is there a way that we can add a feature that when the video is uploaded it doesnt load the whole player and buffer the video.

    You have to click the video to start to load.

    You use vanilla js and there is a fix for this, however its difficult to enable when your blog has hundreds of posts.

    https://www.jqueryscript.net/blog/best-youtube-video-lazy-load.html#vanilla

    If you could add this feature that would be amzing.

    #3714
    Avatar photoBob

    In general, when you use the Insert/Edit Media tool to embed the video Publii automatically adds a loading attribute to the iframe (native lazy load).

    screenshot-2020-09-5-o-14.00.30

    #10940
    Avatar photo[anonymous]
    [anonymous] wrote:

    In general, when you use the Insert/Edit Media tool to embed the video Publii automatically adds a loading attribute to the iframe (native lazy load).

    screenshot-2020-09-5-o-14.00.30

    Has anyone tried loading iFrames via facades in Publii? For example, Lazyframe: https://github.com/vb/lazyframe?
    I’m looking for a way to optimize the loading of Google Maps iFrames.
    One of my sites has 170 articles, each with a Google Maps iFrame. The only thing not optimized on the page is Google maps.

    Screenshot-2023-11-08-at-09.44.47

    #10942
    Avatar photoBob

    Try to add a loading attribute  (loading=”lazy”) to your iframes, it should delay the off-screen loading of iframe elements until the user scrolls near them.