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
- MC1430542: Outlook Adds Copilot Integration for Real-Time Email Drafting

- MC1430543: Excel Copilot Adds Text Summarization and Automatic Category Generation

- MC1430531: Outlook Retires Meeting Insights and Shifts to Copilot Meeting Preparation

- MC1430537: Copilot in Excel Gets Brand Kit Skill to Apply Organizational Branding to Workbooks





![(Updated) Microsoft Teams: New chat sections for muted and meeting chats [MC1269864] 6 (Updated) Microsoft Teams: New chat sections for muted and meeting chats [MC1269864]](https://mwpro.co.uk/wp-content/uploads/2024/08/pexels-joaojesusdesign-921294-150x150.webp)