A minimal Flask app that displays a gallery of images stored in Cloudinary.
Server fetches image metadata via Cloudinary Search API and renders transformed thumbnails.
- Server‑side: Flask + Cloudinary SDK (credentials via
CLOUDINARY_URL
env var) - Responsive thumbnails: 300×300
c_fill,g_auto,f_auto,q_auto
- Full-size images: 800×600
c_fill,g_auto,f_auto,q_auto
- Configurable by folder only
- Clone/Unzip this project.
- Create
.env
file and set:CLOUDINARY_URL=cloudinary://<api_key>:<api_secret>@<cloud_name> GALLERY_FOLDER=pets MAX_RESULTS=20 PORT=5000
- Install dependencies:
pip install -r requirements.txt
- Run:
python app.py
- Open http://localhost:5000
Tip: Upload a few images into the
pets/
folder so they appear in the gallery.
CLOUDINARY_URL
(required): Your Cloudinary connection stringGALLERY_FOLDER
(optional): Folder to search for images (default: "pets")MAX_RESULTS
(optional): Maximum number of images to display (default: 20)PORT
(optional): Port to run on (default: 5000)
- This app uses server‑side credentials; keep
.env
out of version control. - If you get no results, double‑check the folder name and ensure your Cloudinary account has images in that folder.