✂️ Image Resizing to YouTube Shorts Resolution
This endpoint takes an image from a provided URL and resizes it to fit the YouTube Shorts format (720x1280). If the image is already large enough, it will be cropped to center the content. If it's smaller, the image will be scaled and padded.
Endpoint
POST /crop_image_to_short/
Full URL: https://ffmpeg-api-1-hmzg.onrender.com/crop_image_to_short/
Form Data Parameters
image_url
(string): Direct URL of the image to be cropped or padded to Shorts resolution.
Success Response
{
"message": "Image processed for YouTube Shorts format",
"output_file": "https://ffmpeg-api-1-hmzg.onrender.com/uploads/<session_id>_cropped.jpg"
}
Error Response
{ "error": "<server error message>" }
This endpoint requires a direct image URL (e.g., .jpg, .png). The resulting image will match the 720x1280 resolution for YouTube Shorts.
Usage Examples
curl -X POST https://ffmpeg-api-1-hmzg.onrender.com/crop_image_to_short/ \
-F "image_url=https://example.com/image.jpg"