How to turn an image into a URL
A direct image URL is useful when an app, email, CMS, or automation step needs a stable reference instead of a local file or an expiring attachment link. FilePost stores the image you send and returns its public CDN URL in the JSON response.
The API accepts common raster and vector formats, including PNG, JPEG, GIF, SVG, WebP, AVIF, and HEIC. Set the filename mode to public when the original filename belongs in the URL; otherwise the default keeps it out of the public path.
Upload image files with FilePost
Use the authenticated FilePost upload API for image files. The endpoint returns a JSON object containing the public URL, file ID, size, content type, and filename mode.
curl -X POST https://upload.filepost.dev/v1/upload \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@photo.jpg"
Example response
{
"url": "https://cdn.filepost.dev/file/…",
"file_id": "a1b2c3d4e5f6",
"name": "photo.jpg",
"size": 84210,
"content_type": "image/jpeg"
}
What to do with the returned URL
Use the returned URL directly in an image tag, CSS background, email, CMS record, or downstream workflow.
<img src="https://cdn.filepost.dev/file/…" alt="Uploaded image">
Good uses for image to URL
- Website and product-image uploads
- Images from forms and automation workflows
- Public assets that need a stable HTTPS URL
Know the boundary
FilePost hosts the image bytes; it does not resize, crop, optimize, or generate responsive variants. Use a media-transformation service when those operations are the core requirement.
For the complete request and response contract, see the FilePost API documentation. You can also test the flow with the interactive upload on the homepage.