Convert image aspect ratio
by akash9078
Convert images to any aspect ratio (square, widescreen, portrait, custom) with smart background fill and batch processing. Preserve quality and fit every image perfectly.
Opens on Apify.com
About Convert image aspect ratio
Need to make an image fit a specific frame without it looking stretched or weird? I've been there. This actor lets you convert any image to your desired aspect ratio—whether it's a perfect square for a profile pic, a widescreen format for a presentation, a portrait crop, or a completely custom size. What makes it genuinely useful is how it handles the empty space. Instead of just cropping out important parts, it intelligently fills the background to maintain your entire original image, all while keeping the quality sharp. You can feed it common formats like JPG or PNG, and it handles batch processing without a fuss, which is a lifesaver when you're dealing with a whole folder of product images or social media assets. I use it to quickly prep visuals for different platforms without opening heavy editing software. It’s one of those straightforward, no-nonsense tools that just does the job reliably.
What does this actor do?
Convert image aspect ratio is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.
Key Features
- Cloud-based execution - no local setup required
- Scalable infrastructure for large-scale operations
- API access for integration with your applications
- Built-in proxy rotation and anti-blocking measures
- Scheduled runs and webhooks for automation
How to Use
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
Convert Image Aspect Ratio
An Apify actor that transforms images to a target aspect ratio. It handles resizing, cropping, and background filling for various use cases like social media, e-commerce, and web design.
Overview
This actor converts images to a specified aspect ratio. You provide image URLs and configuration settings; it returns the processed images. It supports multiple resize modes, background options, and common cloud storage platforms.
Key Features
- Flexible Aspect Ratios: Convert to standard ratios (1:1, 16:9, 9:16, 4:5, etc.) or any custom ratio.
- Multiple Resize Modes:
- Fit: Maintains original proportions, filling empty space with a background.
- Fill: Crops the image to fit the exact aspect ratio.
- Stretch: Distorts the image to fit the dimensions exactly.
- Background Options: Fill areas with solid colors, transparency, a blurred version of the original image, or a custom hex color.
- Batch Processing: Convert multiple images in a single run.
- Format Support: Input and output support for PNG, JPEG, WebP, GIF, BMP, and TIFF.
- High Resolution: Output images up to 8192x8192 pixels.
- Cloud Storage Integration: Accepts direct URLs or shareable links from Google Drive, Dropbox, OneDrive, Box, and GitHub.
How to Use
Configure the actor run with the following input:
- Image Sources: Provide an array of image URLs. These can be direct links or shareable links from supported cloud platforms.
- Target Aspect Ratio: Define the desired width and height ratio (e.g.,
{"width": 16, "height": 9}). - Resize Mode: Choose
fit,fill, orstretch. - Background Settings: Configure the style (
solid,transparent,blur,custom) and color if needed. - Output Format: Specify the desired image format (e.g.,
jpeg,png).
The actor processes the images and saves the results to the Apify dataset. You can then download them via the Apify console or API.
Input/Output
Input (example JSON):
{
"imageUrls": [
"https://example.com/photo.jpg",
"https://drive.google.com/file/d/FILE_ID/view"
],
"aspectRatio": {
"width": 1,
"height": 1
},
"resizeMode": "fit",
"background": {
"style": "solid",
"color": "#FFFFFF"
},
"outputFormat": "png"
}
Output:
The actor stores processed image files in the run's dataset. Each item typically contains the processed image buffer, a unique key, and metadata like the original source URL.
Categories
Common Use Cases
Market Research
Gather competitive intelligence and market data
Lead Generation
Extract contact information for sales outreach
Price Monitoring
Track competitor pricing and product changes
Content Aggregation
Collect and organize content from multiple sources
Ready to Get Started?
Try Convert image aspect ratio now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- akash9078
- Pricing
- Paid
- Total Runs
- 694
- Active Users
- 8
Related Actors
Web Scraper
by apify
Cheerio Scraper
by apify
Website Content Crawler
by apify
Legacy PhantomJS Crawler
by apify
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support