Giter Club home page Giter Club logo

Comments (4)

rgba1111 avatar rgba1111 commented on June 9, 2024

Hey @hansipete I have the exact same issue. Did you find any solution in the meantime? 🙏 Or maybe @johannschopplich got any hint?

from kirby-blurry-placeholder.

rgba1111 avatar rgba1111 commented on June 9, 2024

For context I have seen the closed thread and added the 'format' => 'webp', but only get jpgs


<?php

return [
    'johannschopplich.blurry-placeholder' => [
        'pixel-target' => 60
    ]
];
return [
    'thumbs' => [
        'format' => 'webp',
        'srcsets' => [
            'default' => [
                '300w'  => ['width' => 450],
                '600w'  => ['width' => 900],
                '900w'  => ['width' => 1350],
                '1200w' => ['width' => 1800],
                '1800w' => ['width' => 2400],
                '2400w' => ['width' => 3200],
                '3000w' => ['width' => 4000]
            ],
            'webp' => [
                '300w'  => ['width' => 450, 'format' => 'webp'],
                '600w'  => ['width' => 900, 'format' => 'webp'],
                '900w'  => ['width' => 1350, 'format' => 'webp'],
                '1200w' => ['width' => 1800, 'format' => 'webp'],
                '1800w' => ['width' => 2400, 'format' => 'webp'],
                '2400w' => ['width' => 3200, 'format' => 'webp'],
                '3000w' => ['width' => 4000, 'format' => 'webp']
            ],
            'index-jpg' => [
                '300w'  => ['width' => 450],
                '600w'  => ['width' => 900],
                '900w'  => ['width' => 1350],
                '1200w' => ['width' => 1800],
                '1800w' => ['width' => 2400]
            ],
            'core-webp' => [
                '300w'  => ['width' => 450, 'format' => 'webp'],
                '600w'  => ['width' => 900, 'format' => 'webp'],
                '900w'  => ['width' => 1350, 'format' => 'webp'],
                '1200w' => ['width' => 1800, 'format' => 'webp'],
                '1800w' => ['width' => 2400, 'format' => 'webp']
            ],
            'core-jpg' => [
                '300w'  => ['width' => 450],
                '600w'  => ['width' => 900],
                '900w'  => ['width' => 1350],
                '1200w' => ['width' => 1800]
            ],
            'core-webp' => [
                '300w'  => ['width' => 450, 'format' => 'webp'],
                '600w'  => ['width' => 900, 'format' => 'webp'],
                '900w'  => ['width' => 1350, 'format' => 'webp'],
                '1200w' => ['width' => 1800, 'format' => 'webp'],
            ],
            'card-webp' => [
                '300w'  => ['width' => 450, 'format' => 'webp'],
                '600w'  => ['width' => 900, 'format' => 'webp']
            ],
            'card-jpg' => [
                '300w'  => ['width' => 450],
                '600w'  => ['width' => 900]
            ],
        ]
    ]
];

from kirby-blurry-placeholder.

hansipete avatar hansipete commented on June 9, 2024

Unfortunately I can't remember how I fixed it at the end, but it is working now: I have blurry placeholders and webp images loaded afterwards.

See this (stripped down) snippet that I use:

<picture>
    <source
        type="image/webp"
        data-srcset="<?= $image->srcset('webp') ?>"
        sizes="<?= $sizes ?>"
        data-lazyload
    >
    <img
        src="<?= $image->placeholderUri() ?>"
        data-src="<?= $image->resize(400)->url() ?>"
        data-srcset="<?= $image->srcset() ?>"
        sizes="<?= $sizes ?>"
        data-lazyload
        width="<?= $image->resize(1920)->width() ?>"
        height="<?= $image->resize(1920)->height() ?>"
        alt="<?= $image->alt() ?>"
    >
</picture>

I had issues with loadeer so I moved over to lozad. Hope this helps!

from kirby-blurry-placeholder.

johannschopplich avatar johannschopplich commented on June 9, 2024

I had issues with loadeer so I moved over to lozad. Hope this helps!

Sad. 😄 Would be great to know what the exact issue was!

Since I'm neither using the <picture> tag, nor WebP in this context, I unfortunately can't provide a solution (also don't have the time to test). Would be great to provide a minimal reproducible example to help the community test your setup and let the issue be found more easily

from kirby-blurry-placeholder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.