Posts by ilou

    or when some kind of fallback mechanism is implemented

    You can use the picture-Element to add such support. You can then define different sources and at last an image-tag for example. So, if one of the sources isn't supported by a browser (e.g. webp in IE/Safari/...) it will be skipped.


    If a browser doesn't support picture-Element it will also fallback to the normal img.


    It could then look like this

    HTML
    <picture>
    <source srcset="image.webp" type="image/webp"> <!-- Skipped, if Browser doesn't support image/webp -->
    <source srcset="image.jpg" type="image/jpeg">
    <img src="image.jpg"> <!-- fallback for browsers that don't support picture-tag -->
    </picture>

    Problem here is: You have to save webp AND jpeg-files, but regarding e.meneses post, you can deliver jpeg-images by converting them on request from the saved webp-file.

    So some images might load a little longer due to high server-load or larger images or something like this (don't know how imagejpeg works), but someone using Internet Explorer shouldn't notice that :P


    Adding a cache saving the images in jpg that were requested in last time should reduce loading speed and server-load too.


    ilou