Cloudflare Images - Manage hosted images with the Images binding
25d ago
Source
CloudflareCloudflare Images - Manage hosted images with the Images bindingcloudflare.comUse 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 .
You might also wanna read
Cloudflare expands AI bot management tools with granular traffic controls for all customers
Cloudflare is celebrating the second "Content Independence Day" by expanding AI traffic management options for all website owners. Building
Workers - Simpler runtime types with @cloudflare/workers-types v5
Cloudflare·2d ago
AI Search - Manage AI Search sync jobs with Wrangler CLI
Cloudflare·3d ago
Cache - Cache multiple versions of a URL with Vary
Cloudflare·3d ago
Cloudflare One - Hostname routing for Cloudflare Mesh
Cloudflare·3d ago
Workers - Work across multiple accounts with Wrangler auth profiles
Cloudflare·3d ago

Comments
Sign in to join the conversation.
No comments yet. Be the first.