Manual installation of IMGHaste service worker

Requirements

1) Register your account

2) Add your Website to imghaste

 

Manually installation of IMGHaste service worker is only recommended in case of custom websites or in cases our Official WordPress Plugin fails to register service worker

Step 1

Create a file named 'image-service.ih.js' with the following content:

self.importScripts('https://cdn.imghaste.com/v1/{your_bucket_id}/service-worker.js');

Your {bubket_id} is your domain name without www. For instance, imghaste.com or esolutions.gr. If you are not sure about your bucket_id please contact us via live chat or via email.

Step 2

Upload the file “image-service.ih.js” into your website root folder (in most cases a .htaccess or/and license.txt files will be there too)

image-service.ih.js file of step 1 should be available in https://www.<your_domain_name>/image-service.ih.js

Step 3

Place in <head>  section of each of your web page the following code:

<meta http-equiv='Accept-CH' content='Width, Viewport-Width, DPR, Downlink, Save-Data, Device-Memory, RTT, ECT'>
<script src='https://cdn.imghaste.com/sw/sdk.js?f=image-service.ih.js'></script>