LeftyLlama
LeftyLlama
CDCloudflare Developers
Created by Rohil on 1/8/2025 in #workers-help
How to optimize images that are external?
I don't think this is possible by modifying the URL alone, but it should be doable by having your worker actually request the image using fetch, as documented here: https://developers.cloudflare.com/images/transform-images/transform-via-workers/#an-example-worker
5 replies
CDCloudflare Developers
Created by LeftyLlama on 11/28/2024 in #pages-help
WebSockets: Uncaught (in response) Error: The script will never generate a response.
I figured it out, the issue is that there that the WebSocket is never properly closed, meaning that the function reaches a state where it can never be resolved. Adding a listener like this fixes it:
server.addEventListener("close", () => {
server.close();
});
server.addEventListener("close", () => {
server.close();
});
2 replies
CDCloudflare Developers
Created by LeftyLlama on 7/20/2024 in #workers-help
Dynamic image rendering with Workers
I managed to get it working with node-pureimage, an implementation of the Canvas API with no native dependencies. It did require a few tweak though, documented here: https://github.com/joshmarinacci/node-pureimage/issues/138
3 replies
CDCloudflare Developers
Created by LeftyLlama on 4/7/2024 in #workers-help
Worker not finding module when "node:" prefix is used
Ah got it, I interpreted it as needing that prefix on all node modules
3 replies
CDCloudflare Developers
Created by LeftyLlama on 11/4/2023 in #pages-help
ERR_SSL_VERSION_OR_CIPHER_MISMATCH on newly deployed Pages site
It's working for me now, thanks for your help
7 replies