How to add webp support in Safari browser

The webp format is not supported by Safari as of today, and I’m not sure if it is planned for implementation in the near future. But you can give the browser a choice whether to use webp or jpg like so. <picture> <source srcset=” https://stackoverflow.com/uploads/img_small.webp 1x, https://stackoverflow.com/uploads/img_big.webp 2x” type=”image/webp”> <source srcset=” https://stackoverflow.com/uploads/img_small.jpg 1x, https://stackoverflow.com/uploads/img_big.jpg 2x” … Read more

Detecting WebP support

This is my solution – is taking around 6ms and I’m considering WebP is only a feature for a modern browser. Uses a different approach using canvas.toDataUrl() function instead of image as the way to detect the feature: function support_format_webp() { var elem = document.createElement(‘canvas’); if (!!(elem.getContext && elem.getContext(‘2d’))) { // was able or not … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)