Should I use both no-webp and no-jpeg2000 for fallbacks on Modernizr?

49 Views Asked by At

I'm unsure of whether I need to use both no-webp and no-jpeg2000, like this:

.no-webp .no-jpeg2000 .coverart.pli {
    background-image: url('../img/coupe.jpg');
}

or if it is sufficient to only use one as a fallback, i.e.:

.no-webp .coverart.pli {
    background-image: url('../img/coupe.jpg');
}

Thanks in advance!

1

There are 1 best solutions below

0
Nick Tereh On

Modernizr sometimes doesn't work. That's why I prefer this way:

.coverart.pli {
    background-image: url('../img/coupe.jpg');
}

.webp .coverart.pli {
    background-image: url('../img/coupe.webp');
}