Re: Detecting if webp file exist on server

12 views
Skip to first unread message

Pascal Massimino

unread,
Jan 10, 2018, 8:16:46 AM1/10/18
to WebP Discussion
Hi,

On Mon, Jan 8, 2018 at 9:24 AM, Paweł Dancewicz <kucharz...@gmail.com> wrote:
Hi there folks, 

I'm using gulp for converting all images on my server where page is placed, on client side I've to check if browser supports webp and then if file exist in this directory else print original png/jpg file.
Right now I'm using http request for checking if webp exist but this is quite inefficient. 


Not sure exactly what your client/app is doing, but you may want to have a look at picture's srcset.
There are tutorials floating around, e.g.: 

hope it helps,
skal/
 
Any ideas how may I make it better without any server side checking? 
Best Regards

--
You received this message because you are subscribed to the Google Groups "WebP Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webp-discuss+unsubscribe@webmproject.org.
To post to this group, send email to webp-d...@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/webp-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.

Paweł Dancewicz

unread,
Jan 10, 2018, 8:20:12 AM1/10/18
to WebP Discussion
Hi skal, 

I'm just trying to find out an efficient way to check if webp image exist on server before fetching it using only client side js. 

Regards, 
Paweł 
Reply all
Reply to author
Forward
0 new messages