Media Uploads — Content Reference
Folder: static/img/
Pycora Pro stores all media — images, logos, photos — in a single folder. Decap CMS gives you a media library to upload, browse, and select files.

Where Media Lives
| Layer | Path |
|---|---|
| On disk | static/img/ |
| In your content | /img/filename.ext |
| On the live site | https://your-site.com/img/filename.ext |
The mapping is defined in static/admin/config.yml:
media_folder: "static/img"
public_folder: "/img"
media_folder— where files are saved on diskpublic_folder— the URL prefix used in content
Supported Formats
Pycora Pro works with any image format your browser supports.
| Format | Best For | Notes |
|---|---|---|
| AVIF | Hero images, featured images | Smallest file size |
| WebP | General use | Wide browser support |
| JPG | Photos | Universal |
| PNG | Logos, icons with transparency | Larger files |
| SVG | Icons, logos | Scalable, tiny |
Tip: Convert large JPGs and PNGs to WebP or AVIF before uploading. This keeps your site fast and your Lighthouse score high.
Recommended Sizes
| Use | Size | File Size |
|---|---|---|
| Hero image | 1600×900 | Under 200 KB |
| Featured image | 1200×630 | Under 150 KB |
| Project card | 800×600 | Under 100 KB |
| Client photo | 400×400 | Under 50 KB |
| Logo | SVG or 200×200 | Under 20 KB |
| Favicon | 32×32 or 64×64 | Under 10 KB |
How to Upload an Image
- Open the CMS at
/admin/ - Open any page with an image field (e.g., Pages → Home Page → Hero → Image)
- Click the image field
- Click Upload
- Select a file from your computer
- Wait for the upload to finish
- Click Save
The image is stored in static/img/ and referenced as /img/filename.ext.
How to Use an Existing Image
If the image is already in static/img/:
- Click the image field
- Click Choose an existing image
- Browse the media library
- Select the image
- Click Save
How to Replace an Image
- Open the image field
- Click Upload
- Select the new image
- Click Save
The new file is committed. The old file remains in static/img/ — you can delete it manually via Git if you want.
How to Delete an Image
- Open the media library (click any image field → Choose an existing image)
- Hover over the image you want to delete
- Click the trash icon
- Confirm
Warning: Deleting an image used elsewhere on your site will break those pages. Check first.
Image Naming Best Practices
Use clean, descriptive filenames:
| Good | Bad |
|---|---|
hero-homepage.avif | IMG_2024_final_v2.jpg |
client-alvio.avif | Untitled-1.png |
logo-dark.svg | logo (1).svg |
Rules:
- All lowercase
- Use hyphens, not spaces
- No special characters
- Keep it short
Where to Use Images
Every image field in Pycora Pro maps to a specific section:
| Page | Field | Purpose |
|---|---|---|
| Home Page → Hero | hero.image.url | Hero image on the homepage |
| Home Page → Intro Grid 1 | intro_grid1.image | First grid image |
| Home Page → Intro Grid 3 | intro_grid3.image | Third grid image |
| Home Page → Testimonial | testimonial.image | Testimonial background |
| Home Page → Testimonial → Client | testimonial.client.image | Client photo |
| About Page | image | About page image |
| Contact Page | image | Contact page image |
| Blog Posts | image | Featured image per post |
| Projects | image | Featured image per project |
| Site Settings | image, favicon, logo | Global brand assets |
How Images Are Served
Pycora Pro copies everything from static/ to output/ on every build. So:
static/img/hero.avif → output/img/hero.avif → /img/hero.avif
No image processing. No CDN transformation. The file you upload is the file that ships.
Optimizing Images
Before uploading, optimize your images:
- Resize to the largest size needed (see recommended sizes above)
- Convert to AVIF or WebP using a tool like Squoosh
- Compress — aim for 60–80% quality
- Upload
For AVIF support in your editor, see the Squoosh guide.
Best Practices
- Use AVIF or WebP — smallest file sizes
- Resize before uploading — do not upload 4000px photos
- Name files descriptively — helps with SEO and organization
- Keep
static/img/organized — no subfolders needed, but keep it clean - Delete unused images — keeps the repo lean
Troubleshooting
Image does not appear after upload
- Check that
static/img/contains the file - Check that the field value starts with
/img/ - Refresh with
Ctrl + Shift + R - Check the terminal for build errors
Upload fails with an error
- Check that Terminal 1 (Decap server) is running (local mode)
- Check that the file is under 10 MB
- Check that
static/img/exists and is writable
Image appears broken on the live site
The image path in your content must match a file inside static/img/. Check for typos in the filename.
Image is too large / slow to load
Convert to WebP or AVIF using Squoosh. Aim for under 200 KB per image.
Existing image is not in the media library
The media library reads from static/img/. If the file exists on disk but not in the library:
- Check that the file name has no spaces
- Refresh the CMS page
- Check that
media_folderis correct inconfig.yml
Related
What's Next?
You have completed the Content Creation Reference. You can now:
- Explore the Developer Guide to extend Pycora Pro
- Return to the User Guide Overview
- Need a custom project? Hire us on Fiverr