Use the Images binding to upload, list, retrieve, update, and delete images stored in Images directly from your Worker without managing API tokens or making HTTP requests.
The env.IMAGES.hosted namespace supports the following storage and management operations:
.upload(image, options)— Upload a new image to your account..list(options)— List images with pagination..image(imageId).details()— Get image metadata..image(imageId).bytes()— Stream the original image bytes..image(imageId).update(options)— Update metadata or access controls..image(imageId).delete()— Delete an image.
For example, you can upload an image from a request body and return its metadata:
const image = await env.IMAGES.hosted.upload(request.body, { filename: "upload.jpg", metadata: { source: "worker" },});
return Response.json(image);Or retrieve and serve the original bytes of a hosted image:
const bytes = await env.IMAGES.hosted.image("IMAGE_ID").bytes();return new Response(bytes);For more information, refer to the Images binding.
Source: Cloudflare
Latest Posts
- AWS End User Messaging and Amazon SES now offer AI agent skills for the AWS MCP Server

- Amazon EC2 M8i and M8i-flex instances are now available in additional regions

- Amazon EC2 R8i and R8i-flex instances are now available in additional regions

- Amazon EC2 C8i and C8i-flex instances are now available in additional regions







