Social media image resizer: one photo, six formats

Instagram square and portrait, Stories, LinkedIn, X and Facebook, each cropped on the subject. In bulk, through the API, identical every time.

Drop an image to try itor click to choose a fileTry it on your imageTap to choose a photoJPEG, PNG, WebP, AVIF… up to 10 MB · no account needed
Before — Original
After — x/photo.jpg
385 KB90 KB−77%x/photo.jpg

Files produced

What one image gives you, measured on the sample image: 6 files.

FileDimensionsWeightvs. original
Original (JPEG)2,400 × 1,600385 KB—
instagram/photo-square.jpg1,080 × 1,08073 KB−81%
instagram/photo-portrait.jpg1,080 × 1,350108 KB−72%
stories/photo.jpg1,080 × 1,920166 KB−57%
linkedin/photo.jpg1,200 × 62737 KB−90%
facebook/photo.jpg1,200 × 63038 KB−90%
x/photo.jpg1,600 × 90090 KB−77%
Total · 6513 KB+33%

Figures measured on November 25, 2026.

How it works

  1. Use the workflow

    Create a free account: the workflow is copied into it, published and ready to run. Change any setting in the visual editor if you need to.

  2. Drop your images

    Drag a whole folder onto the Run page. Every image goes through exactly the same steps, in parallel.

  3. Download the ZIP or call the API

    Get every file in one ZIP, or automate it: one API call per image or per batch, from a script or your CI.

Run it from the API

With an API key (Settings → API keys), copy the workflow once, then send images to it. Same files, byte for byte, as in the app.

curl
export API=https://app.imagebake.com/v1 KEY=$IMAGEBAKE_API_KEY

# 1. Copy the workflow into your team (once)
WF=$(curl -sS -X POST "$API/catalog/social-media-pack/duplicate" \
  -H "Authorization: Bearer $KEY" -H "Idempotency-Key: social-media-pack" | jq -r .id)

# 2. Upload an image (signed URL, no Authorization)
UP=$(curl -sS -X POST "$API/uploads" -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d "{\"files\":[{\"name\":\"photo.jpg\",\"size\":$(wc -c < photo.jpg)}]}")
curl -sS -X PUT -T photo.jpg "$(jq -r '.data[0].upload.url' <<<"$UP")"
ASSET=$(jq -r '.data[0].id' <<<"$UP")
curl -sS -X POST "$API/uploads/$ASSET/confirm" -H "Authorization: Bearer $KEY"

# 3. Run it and wait for the result (up to 30 s)
curl -sS -X POST "$API/workflows/$WF/runs?wait=30" -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" -d "{\"assets\":[\"$ASSET\"]}" \
  | jq -r '.outputs[] | "\(.path)  \(.url)"'
Node.js
// Node 18+: native fetch, no dependency
import { readFile } from 'node:fs/promises'

const API = 'https://app.imagebake.com/v1'
const auth = { Authorization: `Bearer ${process.env.IMAGEBAKE_API_KEY}` }
const call = async (path, { body, headers = {} } = {}) => {
  const res = await fetch(API + path, {
    method: 'POST',
    headers: { ...auth, 'Content-Type': 'application/json', ...headers },
    body: body && JSON.stringify(body),
  })
  if (!res.ok) throw new Error((await res.json()).error.message)
  return res.json()
}

// 1. Copy the workflow into your team (once)
const wf = await call('/catalog/social-media-pack/duplicate', { headers: { 'Idempotency-Key': 'social-media-pack' } })

// 2. Upload an image (signed URL, no Authorization)
const image = await readFile('photo.jpg')
const { data: [asset] } = await call('/uploads', { body: { files: [{ name: 'photo.jpg', size: image.length }] } })
await fetch(asset.upload.url, { method: 'PUT', headers: asset.upload.headers, body: image })
await call(`/uploads/${asset.id}/confirm`)

// 3. Run it and wait for the result (up to 30 s)
const run = await call(`/workflows/${wf.id}/runs?wait=30`, { body: { assets: [asset.id] } })
for (const output of run.outputs) console.log(output.path, output.url)
Python
# Python 3.8+ and requests (pip install requests)
import os
import requests

API = 'https://app.imagebake.com/v1'
session = requests.Session()
session.headers['Authorization'] = f"Bearer {os.environ['IMAGEBAKE_API_KEY']}"

def call(path, body=None, headers=None):
    response = session.post(API + path, json=body, headers=headers)
    if not response.ok:
        raise RuntimeError(response.json()['error']['message'])
    return response.json()

# 1. Copy the workflow into your team (once)
wf = call('/catalog/social-media-pack/duplicate', headers={'Idempotency-Key': 'social-media-pack'})

# 2. Upload an image (signed URL, no Authorization)
with open('photo.jpg', 'rb') as f:
    image = f.read()
asset = call('/uploads', {'files': [{'name': 'photo.jpg', 'size': len(image)}]})['data'][0]
headers = {name: ', '.join(value) if isinstance(value, list) else value
           for name, value in asset['upload']['headers'].items()}
requests.put(asset['upload']['url'], headers=headers, data=image).raise_for_status()
call(f"/uploads/{asset['id']}/confirm")

# 3. Run it and wait for the result (up to 30 s)
run = call(f"/workflows/{wf['id']}/runs?wait=30", {'assets': [asset['id']]})
for output in run['outputs']:
    print(output['path'], output['url'])
PHP
<?php
// PHP 8.1+ and Guzzle 7 (composer require guzzlehttp/guzzle)
$api = new GuzzleHttp\Client([
    'base_uri' => 'https://app.imagebake.com/v1/',
    'headers' => ['Authorization' => 'Bearer '.getenv('IMAGEBAKE_API_KEY'), 'Accept' => 'application/json'],
]);
$json = fn ($response) => json_decode((string) $response->getBody(), true);

// 1. Copy the workflow into your team (once)
$wf = $json($api->post('catalog/social-media-pack/duplicate', ['headers' => ['Idempotency-Key' => 'social-media-pack']]));

// 2. Upload an image (signed URL, no Authorization)
$image = file_get_contents('photo.jpg');
$asset = $json($api->post('uploads', ['json' => ['files' => [['name' => 'photo.jpg', 'size' => strlen($image)]]]]))['data'][0];
(new GuzzleHttp\Client)->put($asset['upload']['url'], ['headers' => $asset['upload']['headers'], 'body' => $image]);
$api->post("uploads/{$asset['id']}/confirm");

// 3. Run it and wait for the result (up to 30 s)
$run = $json($api->post("workflows/{$wf['id']}/runs?wait=30", ['json' => ['assets' => [$asset['id']]]]));
foreach ($run['outputs'] as $output) {
    echo $output['path'], '  ', $output['url'], PHP_EOL;
}
Go
// Go 1.21+: standard library, no dependency
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"log"
	"net/http"
	"os"
)

const api = "https://app.imagebake.com/v1"

func call(path string, body any, headers map[string]string, out any) {
	var payload []byte
	if body != nil {
		payload, _ = json.Marshal(body)
	}
	request, _ := http.NewRequest("POST", api+path, bytes.NewReader(payload))
	request.Header.Set("Authorization", "Bearer "+os.Getenv("IMAGEBAKE_API_KEY"))
	request.Header.Set("Content-Type", "application/json")
	for name, value := range headers {
		request.Header.Set(name, value)
	}
	response, err := http.DefaultClient.Do(request)
	if err != nil {
		log.Fatal(err)
	}
	defer response.Body.Close()
	if response.StatusCode >= 400 {
		var failure struct{ Error struct{ Message string } }
		json.NewDecoder(response.Body).Decode(&failure)
		log.Fatal(failure.Error.Message)
	}
	if out != nil {
		json.NewDecoder(response.Body).Decode(out)
	}
}

func main() {
	// 1. Copy the workflow into your team (once)
	var wf struct{ ID string }
	call("/catalog/social-media-pack/duplicate", nil, map[string]string{"Idempotency-Key": "social-media-pack"}, &wf)

	// 2. Upload an image (signed URL, no Authorization)
	image, _ := os.ReadFile("photo.jpg")
	var uploads struct {
		Data []struct {
			ID     string
			Upload struct {
				URL     string
				Headers map[string]any
			}
		}
	}
	call("/uploads", map[string]any{"files": []any{map[string]any{"name": "photo.jpg", "size": len(image)}}}, nil, &uploads)
	asset := uploads.Data[0]
	put, _ := http.NewRequest("PUT", asset.Upload.URL, bytes.NewReader(image))
	for name, value := range asset.Upload.Headers {
		values, ok := value.([]any)
		if !ok {
			values = []any{value}
		}
		for _, item := range values {
			put.Header.Add(name, fmt.Sprint(item))
		}
	}
	if response, err := http.DefaultClient.Do(put); err != nil || response.StatusCode >= 300 {
		log.Fatal("upload failed: ", err)
	}
	call("/uploads/"+asset.ID+"/confirm", nil, nil, nil)

	// 3. Run it and wait for the result (up to 30 s)
	var run struct{ Outputs []struct{ Path, URL string } }
	call("/workflows/"+wf.ID+"/runs?wait=30", map[string]any{"assets": []string{asset.ID}}, nil, &run)
	for _, output := range run.Outputs {
		fmt.Println(output.Path, output.URL)
	}
}
C#
// .NET 10+: dotnet run run.cs, no dependency
using System.Text;
using System.Text.Json;
using System.Text.Json.Nodes;

using var api = new HttpClient { BaseAddress = new("https://app.imagebake.com/v1/") };
api.DefaultRequestHeaders.Authorization = new("Bearer", Environment.GetEnvironmentVariable("IMAGEBAKE_API_KEY"));

async Task<JsonElement> Call(string path, JsonObject? body = null, string? idempotencyKey = null)
{
    using var request = new HttpRequestMessage(HttpMethod.Post, path)
    {
        Content = new StringContent((body ?? new JsonObject()).ToJsonString(), Encoding.UTF8, "application/json"),
    };
    if (idempotencyKey is not null) request.Headers.Add("Idempotency-Key", idempotencyKey);
    using var response = await api.SendAsync(request);
    var json = JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;
    if (!response.IsSuccessStatusCode) throw new Exception(json.GetProperty("error").GetProperty("message").GetString());
    return json;
}

// 1. Copy the workflow into your team (once)
var wf = await Call("catalog/social-media-pack/duplicate", idempotencyKey: "social-media-pack");

// 2. Upload an image (signed URL, no Authorization)
var image = await File.ReadAllBytesAsync("photo.jpg");
var asset = (await Call("uploads", new JsonObject
{
    ["files"] = new JsonArray(new JsonObject { ["name"] = "photo.jpg", ["size"] = image.Length }),
})).GetProperty("data")[0];
var upload = asset.GetProperty("upload");
using var put = new HttpRequestMessage(HttpMethod.Put, upload.GetProperty("url").GetString()) { Content = new ByteArrayContent(image) };
foreach (var header in upload.GetProperty("headers").EnumerateObject())
{
    if (header.Name.Equals("host", StringComparison.OrdinalIgnoreCase)) continue;
    var value = header.Value.ValueKind == JsonValueKind.Array ? string.Join(", ", header.Value.EnumerateArray()) : header.Value.GetString();
    if (!put.Headers.TryAddWithoutValidation(header.Name, value)) put.Content.Headers.TryAddWithoutValidation(header.Name, value);
}
using var storage = new HttpClient();
(await storage.SendAsync(put)).EnsureSuccessStatusCode();
await Call($"uploads/{asset.GetProperty("id")}/confirm");

// 3. Run it and wait for the result (up to 30 s)
var run = await Call($"workflows/{wf.GetProperty("id")}/runs?wait=30", new JsonObject
{
    ["assets"] = new JsonArray(asset.GetProperty("id").GetString()),
});
foreach (var output in run.GetProperty("outputs").EnumerateArray())
    Console.WriteLine($"{output.GetProperty("path")}  {output.GetProperty("url")}");
Ruby
# Ruby 3+: standard library (net/http), no gem
require 'json'
require 'net/http'

API = 'https://app.imagebake.com/v1'
AUTH = { 'Authorization' => "Bearer #{ENV.fetch('IMAGEBAKE_API_KEY')}", 'Content-Type' => 'application/json' }

def call(path, body = {}, headers = {})
  response = Net::HTTP.post(URI(API + path), body.to_json, AUTH.merge(headers))
  json = JSON.parse(response.body)
  raise json['error']['message'] unless response.is_a?(Net::HTTPSuccess)
  json
end

# 1. Copy the workflow into your team (once)
wf = call('/catalog/social-media-pack/duplicate', {}, 'Idempotency-Key' => 'social-media-pack')

# 2. Upload an image (signed URL, no Authorization)
image = File.binread('photo.jpg')
asset = call('/uploads', files: [{ name: 'photo.jpg', size: image.bytesize }])['data'][0]
uri = URI(asset['upload']['url'])
put = Net::HTTP::Put.new(uri, 'Content-Type' => 'application/octet-stream')
asset['upload']['headers'].each { |name, value| put[name] = Array(value).join(', ') }
put.body = image
Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') { |http| http.request(put) }.value
call("/uploads/#{asset['id']}/confirm")

# 3. Run it and wait for the result (up to 30 s)
run = call("/workflows/#{wf['id']}/runs?wait=30", assets: [asset['id']])
run['outputs'].each { |output| puts "#{output['path']}  #{output['url']}" }
Java
// Java 17+ and Gson (com.google.code.gson:gson): java -cp gson.jar Run.java
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Map;

public class Run {
    static final String API = "https://app.imagebake.com/v1";
    static final HttpClient http = HttpClient.newHttpClient();

    static JsonObject call(String path, Object body, String... headers) throws Exception {
        var request = HttpRequest.newBuilder(URI.create(API + path))
            .header("Authorization", "Bearer " + System.getenv("IMAGEBAKE_API_KEY"))
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(new Gson().toJson(body)));
        if (headers.length > 0) request.headers(headers);
        var response = http.send(request.build(), HttpResponse.BodyHandlers.ofString());
        var json = JsonParser.parseString(response.body()).getAsJsonObject();
        if (response.statusCode() >= 400) throw new RuntimeException(json.getAsJsonObject("error").get("message").getAsString());
        return json;
    }

    public static void main(String[] args) throws Exception {
        // 1. Copy the workflow into your team (once)
        var wf = call("/catalog/social-media-pack/duplicate", Map.of(), "Idempotency-Key", "social-media-pack");

        // 2. Upload an image (signed URL, no Authorization)
        var image = Files.readAllBytes(Path.of("photo.jpg"));
        var asset = call("/uploads", Map.of("files", List.of(Map.of("name", "photo.jpg", "size", image.length))))
            .getAsJsonArray("data").get(0).getAsJsonObject();
        var upload = asset.getAsJsonObject("upload");
        var put = HttpRequest.newBuilder(URI.create(upload.get("url").getAsString()))
            .PUT(HttpRequest.BodyPublishers.ofByteArray(image));
        for (var header : upload.getAsJsonObject("headers").entrySet()) {
            if (header.getKey().equalsIgnoreCase("host")) continue;
            var values = header.getValue().isJsonArray() ? header.getValue().getAsJsonArray() : List.of(header.getValue());
            for (var value : values) put.header(header.getKey(), value.getAsString());
        }
        var status = http.send(put.build(), HttpResponse.BodyHandlers.discarding()).statusCode();
        if (status >= 300) throw new RuntimeException("Upload: HTTP " + status);
        call("/uploads/" + asset.get("id").getAsString() + "/confirm", Map.of());

        // 3. Run it and wait for the result (up to 30 s)
        var run = call("/workflows/" + wf.get("id").getAsString() + "/runs?wait=30",
            Map.of("assets", List.of(asset.get("id").getAsString())));
        for (var output : run.getAsJsonArray("outputs")) {
            var o = output.getAsJsonObject();
            System.out.println(o.get("path").getAsString() + "  " + o.get("url").getAsString());
        }
    }
}

Social media image sizes this workflow uses

Every network crops and recompresses what you upload. Sending an image at the size it expects gives you control over the crop and avoids a second, blurrier compression on their side. These are the sizes the workflow produces; they follow the recommendations published by each network and are easy to change in the editor if a platform updates its guidelines.

Network and placement Ratio Size (px) File
Instagram feed, square 1:1 1080 × 1080 instagram/photo-square.jpg
Instagram feed, portrait 4:5 1080 × 1350 instagram/photo-portrait.jpg
Instagram and Facebook Stories, Reels cover 9:16 1080 × 1920 stories/photo.jpg
LinkedIn post with an image 1.91:1 1200 × 627 linkedin/photo.jpg
X (Twitter) post 16:9 1600 × 900 x/photo.jpg
Facebook post and link preview 1.91:1 1200 × 630 facebook/photo.jpg

The portrait 4:5 format takes the most room in the Instagram feed, which is why many brands use it by default; the square version is still useful for grids and profile highlights. On LinkedIn and Facebook, 1.91:1 is also the shape of a link preview, so the same files work for a post and for a shared article.

Why crop on the subject instead of in the center

A center crop works for portraits shot in the middle of the frame and fails for everything else: a product on the left of a packshot, a speaker on a stage, a building in a wide landscape. The workflow runs a smart crop before each resize. It scores regions of the image on contrast, saturation and skin tones, then keeps the window that contains the most interesting part, at the exact ratio of the target format.

Each format gets its own crop from the original, not from another output: the 9:16 Story is not a slice of the square version, it is computed from the full photo. That keeps the best possible resolution for every network.

One photo in, one tidy folder out

Social media managers, agencies and e-commerce teams usually face the same job: a shoot of 40 photos to publish across five networks. Doing it by hand in an image editor means 200 exports with the right sizes, names and quality. With this workflow:

  1. you drop the 40 photos on the Run page;
  2. each one produces six files, named after the original and grouped in a folder per network;
  3. you download a single ZIP and hand it over, or schedule the posts directly.

Because the workflow is published as a version, the result is the same next month and for your colleague: same sizes, same JPEG quality (85, progressive), same naming. No preset to share, no “which export settings did we use last time?”.

Quality and file weight

Every file is converted to sRGB, so colours look the same in every app, and stripped of EXIF and GPS metadata, so you never publish the location of a photo by accident. JPEG quality 85 is a good balance for social networks: they recompress your image anyway, and starting from a clean, not over-compressed file limits visible artefacts. The table above the editorial part of this page shows the real size of each file produced from the sample image.

Automate it

If photos come from a DAM, a CMS or a shared drive, call the workflow from the API: upload the image, start a run, and get six signed download links back. A webhook can notify your scheduler when a batch is done. The same API key can run the Open Graph image workflow for blog articles, or the responsive image generator for your website.

Frequently asked questions

What sizes does the workflow produce?

Six JPEG files per photo: 1080×1080 and 1080×1350 for the Instagram feed, 1080×1920 for Stories and Reels, 1200×627 for LinkedIn, 1600×900 for X and 1200×630 for Facebook. You can change or add formats in the visual editor after copying the workflow.

Will the crop cut off my subject?

Each format goes through a smart crop that looks for the most salient area of the image (contrast, skin tones, saturation) before resizing, so the subject stays in frame even in the narrow 9:16 Story format. For images where you want a fixed position, replace the smart crop with a regular crop anchored where you want.

Can I resize hundreds of photos at once?

Yes. Drop a whole folder on the Run page or send the files through the API: every photo goes through the same six steps in parallel, and you download one ZIP with a folder per network.

How much does it cost?

One credit per file produced, so six credits per photo up to 12 megapixels. The free plan includes 500 credits a month, enough for about 80 photos, without a credit card.

Are my photos kept?

Source and result files are deleted automatically after the retention period of your plan (7 days on the free plan). Location and camera metadata (EXIF, GPS) are removed from every file produced.

See all workflows →

Run it on your own images.

Free plan: 500 credits a month, no credit card. 1 file produced = 1 credit.

  • Free€0 / month500 credits / month
  • Starter€9 / month2,500 credits / month
  • Pro€19 / month10,000 credits / month
  • Team€59 / month50,000 credits / month