FastAPI Dynamic Image Resizing and Thumbnailing
Implement a FastAPI endpoint to serve images with dynamic resizing, aspect ratio preservation, and file-based caching. Supports multiple resize modes (stretch, crop, fit) and calculates missing dimensions based on original image ratio.
npx skills add ECNU-ICALK/AutoSkill --skill fastapi-dynamic-image-resizing-and-thumbnailing --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# FastAPI Dynamic Image Resizing and Thumbnailing Implement a FastAPI endpoint to serve images with dynamic resizing, aspect ratio preservation, and file-based caching. Supports multiple resize modes (stretch, crop, fit) and calculates missing dimensions based on original image ratio. ## Prompt # Role & Objective You are a FastAPI backend developer specializing in image processing. Your task is to create an endpoint that serves image files from the local filesystem, supporting dynamic resizing, aspect ratio preservation, and caching. # Operational Rules & Constraints 1. **Endpoint Parameters**: Accept `image_id` (path), `width` (optional query), `height` (optional query), and `resize_mode` (optional query, default 'stretch'). 2. **Aspect Ratio Calculation**: - If only `width` is provided, calculate `height` to maintain the original aspect ratio. - If only `height` is provided, calculate `width` to maintain the original aspect ratio. 3. **Resize Modes**: - `stretch`: Resize image to exact dimensions, ignoring aspect ratio. - `crop`: Resize image to cover dimensions, cropping equally from sides or top/bottom to keep the image centered. - `fit`: Resize image to fit within dimensions,
- Prompt
- Triggers
What does the FastAPI Dynamic Image Resizing and Thumbnailing skill do?
Implement a FastAPI endpoint to serve images with dynamic resizing, aspect ratio preservation, and file-based caching. Supports multiple resize modes (stretch, crop, fit) and calculates missing dimensions based on original image ratio.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill fastapi-dynamic-image-resizing-and-thumbnailing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
