I’m trying to use a worker to http/2 push two images, but somehow the images are getting corrupted when I enable the worker. As soon as I delete the worker, the image links work again.
An example of the corrupted image is at https://drive.google.com/open?id=1zvW8Txejp7wlv1hWO7tZMJqboHO2iV8g
The worker code is at https://drive.google.com/open?id=1ykPMAHcq6Nhnt8FIeymg9Hya090EChNw
The following lines are how I specify which images to push -
response.headers.append(“Link”, “</g3-1/632bff93-home2-cropped-blue_00000000000000000001o.jpg>; rel=preload; as=image;”)
response.headers.append(“Link”, “</g3-1/a944d3d8-landing-page-bg-desktop2-min_00000000000000000001o.jpg>; rel=preload; as=image;”)
It turns out that even if I remove the quoted lines of code above and do not use the worker for pushing the image (i.e. I use it only for appending the domain preconnect link tags) it still somehow corrupts the images and they don’t render. Does anyone have any idea why this is happening?