About the author
Author site: https://shopaii.net
Focused on website development and Google SEO.
GitHub project: https://github.com/chrispengcn/imagebed
How to use the image bed
This image bed is deployed on Cloudflare Pages + R2. It supports image/video uploads, folder management, in-browser previews, and AI image generation. The most common operations are described below.
1. Login
- Click the Login button in the top-right corner.
- Enter the admin password in the dialog, then click Login.
- Once signed in, the header shows Signed in, and the Upload / Delete buttons become active.
- To sign out, click Logout in the top-right corner.
2. Upload files
- On the Gallery page, navigate to the folder you want to upload into using the breadcrumbs (
root / photos / โฆ). - After logging in, click the Upload button in the top-right and pick one or more files.
- Or simply drag and drop files onto the dashed drop zone ("Drop files here to upload") on the left โ they will be uploaded to the current folder.
- Once the upload finishes, files appear in the list immediately. You can preview them on the right and copy the public link.
3. Create a folder
- On the Gallery page, click + new at the right end of the breadcrumb bar.
- Enter a folder name in the prompt (letters, digits, underscores, dashes and
/are allowed) and confirm. - The page switches into the new folder automatically; subsequent uploads will be saved there.
- Note: folders in R2 are purely logical โ a folder only truly exists once it contains at least one file.
4. Delete a file
- Make sure you are logged in.
- Click the file you want to remove in the left-hand list; the preview appears on the right.
- Click the red Delete button on the far right of the preview toolbar.
- Confirm in the dialog to permanently remove the file from R2.
5. AI image generation & model selection
- Switch to the AI Generate tab in the top navigation.
- Pick a Cloudflare Workers AI image model from the Model dropdown at the top of the left form. The parameters supported by that model (steps, guidance, size, seed, etc.) update dynamically.
- Type your description into Prompt. Optionally add a Negative prompt to describe what you don't want.
- Adjust width/height, steps, seed and other parameters as needed.
- Click Generate and wait for the result to appear in the preview area on the right.
- Use Save to R2 to store the generated image directly into the image bed, or Download to save it locally.
- Note: AI generation also requires you to be logged in.
FAQ
- Upload/delete returns 401: your session has expired โ click Login and sign in again.
- Newly uploaded file doesn't show up: click the โป refresh button in the list toolbar.
- Copying links: select a file and click Copy link โ you can paste the URL directly into blogs, forums, or Markdown.