Access to Cloudflare Images
I am setting up CF Images and it's been pretty rough so far. I got Direct Upload going and now I want to serve the image. It looks like serving the image via a worker and using the
fetch
subrequest is the most flexible way to go. However, it is beyond me how I can access the image given the image id from the worker? Am I supposed to pass it a complete variant URL instead? Is there a way to load the source image by it's ID and apply transformations to it instead?3 Replies
Now, stripping everything back. I deployed this worker
it keeps serving the thing with the original size...
second guessing myself going all in on CF now. this has been so painful. i have no clue what is going on and near 0 visibility.
now messing around with setting up routes in the trigger section of my images worker so it loads on
<mydomain>/images/
endpoint and I confirm the wroker is running by way of console logging but now i am getting a 404 saying the source image does not exist even though the URL is hard coded and i can access it when I enter it into the browser...
well, so the 404 only happens whenever i add the { cf: { image: { width: 100 } } }
part to the fetch
call.