Field at a glance
Input and output
Input type
File picker with search and preview (select from Media Library)
API output
- without alt text:
string(URL to asset in Media Library CDN) - with alt text:
objectwith two key-value pairs:urlandalt
API response example
Without alt text
With alt text
Field configuration options
Option name | Type | Function |
|---|---|---|
| Required? | boolean | Make field required to save page |
| Help text | string | Add help text to describe usage to your team |
| Default value | boolean | Set a default value for the field |
Common use cases
Page content
- Hero/banner images
- Featured images
- Author photos
- Thumbnails
- Background images
Products
- Product photos
- Gallery images
- Variant images
- Size charts
- Brand logos
Blogs & articles
- Featured images
- Inline content images
- Author avatars
- Social sharing images
Marketing
- Ad creatives
- Promotional banners
- Logo variations
- Icons and badges
Key features
Explore key features of the Media Field, the ButterCMS Media Library, and our Image CDN.Media library overview
Explore your ButterCMS media library, including sorting, uploading, searching, and tagging media.
Alt text for accessibility and SEO
How to add alt text to images and retrieve from our API.
CDN & performance
Learn about our Media CDN, including how to customize your URLs
Image transformations
How to transform your images: flip, rotate, resize, crop, add filters and effects, and more!
Dynamic image resizing
How to leverage our CDN’s
resize task to create responsive images in your app.Automatic image compression
Learn about ButterCMS’s automatic image compression, including how to switch back to the original image size and format.
Best practices
- Always add alt text to images: Critical for accessibility and SEO
- Optimize before upload: Compress images using tools like TinyPNG
- Use appropriate dimensions: Don’t upload 4000px images for thumbnails
- Leverage transformations: Use URL parameters for responsive images
- Consider lazy loading: Load images only when needed
- Test WebP support: Ensure fallbacks for older browsers
Working with images in your application
- JavaScript/React
- Next.js with Image Optimization