Skip to main content

Cloud — Media Uploads

In the cloud, media uploads work the same way as local — with one key difference: files are committed to GitHub and served by your hosting provider.

Pycora Pro stores all media in:

static/img/

When you upload through Decap CMS, the file is committed to your GitHub repo and appears at /img/filename.ext on your live site.


Before You Begin​

Make sure:

  • Cloud CMS is set up (see Cloud — CMS Access)
  • You are logged into https://your-site.com/admin/
  • Your site is deployed and live

python ssg pro jamstack static site generator

How Cloud Media Upload Works​

Pycora Pro uses Decap CMS's image widget. When you upload:

  1. The file is committed to your GitHub repo under static/img/
  2. Your host (Cloudflare/Netlify/Vercel) detects the commit
  3. The site rebuilds
  4. The image is live at /img/filename.ext

The media folder is defined in static/admin/config.yml:

media_folder: "static/img"
public_folder: "/img"
  • media_folder — where files are saved in the repo
  • public_folder — the URL path used on the live site

Step 1 — Upload an Image​

  1. Open any page in the CMS that has an image field (e.g., Pages → Home Page → Hero → Image)
  2. Click the image field
  3. Click Upload
  4. Select an image from your computer
  5. Wait for the upload
  6. Click Save

The image is committed to GitHub. After the rebuild, it appears on your live site.


Step 2 — Use an Existing Image​

If the image is already in static/img/:

  1. Click the image field
  2. Click Choose an existing image
  3. Browse the media library
  4. Select the image
  5. Click Save

Step 3 — Verify the Upload​

  1. Open your GitHub repository
  2. Navigate to static/img/
  3. Confirm your file is there
  4. Open https://your-site.com and check the image renders

If the image does not appear:

  • Wait 30–90 seconds for the rebuild
  • Refresh with Ctrl + Shift + R
  • Check the host's build log for errors

Supported Formats​

Pycora Pro works with any image format your browser supports. Recommended:

FormatBest ForNotes
AVIFHero images, featured imagesSmallest file size
WebPGeneral useWide browser support
JPGPhotosUniversal
PNGLogos, icons with transparencyLarger files
SVGIcons, logosScalable, tiny

Tip: Convert large JPGs and PNGs to WebP or AVIF before uploading. This keeps your site fast and your Lighthouse score high.


Where to Use Images​

Every image field in Pycora Pro maps to a specific section:

PageFieldPurpose
Home Page → Herohero.image.urlHero image on the homepage
Home Page → Intro Grid 1intro_grid1.imageFirst grid image
Home Page → Intro Grid 3intro_grid3.imageThird grid image
Home Page → Testimonialtestimonial.imageTestimonial background
Home Page → Testimonial → Clienttestimonial.client.imageClient photo
About PageimageAbout page image
Contact PageimageContact page image
Blog PostsimageFeatured image per post
ProjectsimageFeatured image per project
Site Settingsimage, favicon, logoGlobal brand assets

Image Naming Best Practices​

Use clean, descriptive filenames:

GoodBad
hero-homepage.avifIMG_2024_final_v2.jpg
client-alvio.avifUntitled-1.png
logo-dark.svglogo (1).svg

Rules:

  • All lowercase
  • Use hyphens, not spaces
  • No special characters
  • Keep it short

Replacing an Image​

To replace an existing image:

  1. Open the image field
  2. Click Upload
  3. Select the new image
  4. Click Save

The new file is committed. The old file remains in static/img/ — you can delete it manually via GitHub if you want.


Deleting an Image​

To delete an image:

  1. Open the media library (click any image field → Choose an existing image)
  2. Hover over the image you want to delete
  3. Click the trash icon
  4. Confirm

Warning: Deleting an image used elsewhere on your site will break those pages. Check first.


Cloud vs Local Media​

AspectLocalCloud
Where files are storedYour computerGitHub repo
Where images are servedlocalhost:8000/img/your-site.com/img/
Upload speedInstant30–90 seconds
Version controlNoneFull Git history

Everything else — the CMS interface, upload flow, file paths — is identical.


Troubleshooting​

Image does not appear after upload​

  1. Check your GitHub repo — the file should be in static/img/
  2. Check the host's build log — the build should have succeeded
  3. Refresh with Ctrl + Shift + R
  4. Wait 30–90 seconds and try again

Upload fails with an error​

  1. Check that you are logged into the CMS correctly
  2. Check that the file is under 10 MB
  3. Check your network connection
  4. Check the host's build log for errors

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 a free tool like Squoosh. Aim for under 200 KB per image.

Changes save but image is missing on GitHub​

The Git Gateway is not working. See Cloud — CMS Access.


What's Next?​

You know how to upload and use media in the cloud. Let's learn how automatic rebuilds work.

👉 Next: Auto Build →