Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

Input image exceeds pixel limit

Open truekasun opened this issue 2 years ago • 1 comments

Issue Summary

Uploading an animated gif (relatively not too larger) via Ghost Editor throws an internal server error message. I checked the server logs and found out that it throws "Error: Input image exceeds pixel limit at /var/www/mightytools.co/versions/5.74.3/node_modules/@tryghost/image-transform/lib/transform.js:145:15"

Attached the complete log object in the error log section.

Steps to Reproduce

  1. Open the Ghost Editor and try to upload any of the following images.

The image samples to recreate the error:

  • https://github.com/TryGhost/Ghost/assets/278469/467c2bc5-2ec9-495c-8fa0-59aba8129c2b
  • https://github.com/TryGhost/Ghost/assets/278469/fba38d33-77ea-4f41-8a42-f40fdc862af2

Ghost Version

5.74.3

Node.js Version

v18.18.2

How did you install Ghost?

Selfhost | Ubuntu 22.04 (LTS)

Database type

MySQL 5.7

Browser & OS version

No response

Relevant log / error output

{
    "name": "Log",
    "hostname": "mightytools-co",
    "pid": 27826,
    "level": 50,
    "version": "5.74.3",
    "req": {
        "meta": {
            "requestId": "71f217d0-d9ca-4755-a803-33b6a14ffb69",
            "userId": "1"
        },
        "url": "/images/upload/",
        "method": "POST",
        "originalUrl": "/ghost/api/admin/images/upload/",
        "params": {},
        "headers": {
            "x-forwarded-for": "103.247.48.44",
            "x-forwarded-proto": "https",
            "x-real-ip": "103.247.48.44",
            "host": "mightytools.co",
            "connection": "close",
            "content-length": "2871551",
            "sec-ch-ua": "\"Microsoft Edge\";v=\"119\", \"Chromium\";v=\"119\", \"Not?A_Brand\";v=\"24\"",
            "sec-ch-ua-mobile": "?0",
            "app-pragma": "no-cache",
            "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0",
            "content-type": "multipart/form-data; boundary=----WebKitFormBoundaryaLYvXlGJ6kbTBNAB",
            "accept": "text/plain, */*; q=0.01",
            "x-requested-with": "XMLHttpRequest",
            "x-ghost-version": "5.74",
            "sec-ch-ua-platform": "\"Windows\"",
            "origin": "https://mightytools.co",
            "sec-fetch-site": "same-origin",
            "sec-fetch-mode": "cors",
            "sec-fetch-dest": "empty",
            "referer": "https://mightytools.co/ghost/",
            "accept-encoding": "gzip, deflate, br",
            "accept-language": "en-US,en;q=0.9",
            "cookie": "**REDACTED**"
        },
        "query": {}
    },
    "res": {
        "_headers": {
            "x-powered-by": "Express",
            "content-version": "v5.74",
            "vary": "Accept-Version, Origin, Accept-Encoding",
            "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
            "access-control-allow-origin": "https://mightytools.co",
            "content-type": "application/json; charset=utf-8",
            "content-length": "274",
            "etag": "W/\"112-3eS8hcbJdLkzXM+OAb0gZ8In0ok\""
        },
        "statusCode": 500,
        "responseTime": "56ms"
    },
    "err": {
        "id": "ecd82c40-8d0f-11ee-affe-13e14cdc1fc7",
        "domain": "https://mightytools.co",
        "code": "IMAGE_PROCESSING",
        "name": "InternalServerError",
        "statusCode": 500,
        "level": "critical",
        "message": "Unable to manipulate image.",
        "stack": "Error: Input image exceeds pixel limit\n    at /var/www/mightytools.co/versions/5.74.3/node_modules/@tryghost/image-transform/lib/transform.js:145:15",
        "hideStack": false
    },
    "msg": "Unable to manipulate image.",
    "time": "2023-11-27T10:30:03.273Z",
    "v": 0
}

Code of Conduct

  • [X] I agree to be friendly and polite to people in this repository

truekasun avatar Nov 27 '23 11:11 truekasun

This is a duplicate of https://github.com/TryGhost/Ghost/issues/17278, but it was closed at the time. I'll tag this one a bug and accept PRs to fix it 🙂

daniellockyer avatar Nov 28 '23 08:11 daniellockyer

Our bot has automatically marked this issue as stale because there has not been any activity here in some time.

The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR.

We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂

github-actions[bot] avatar Mar 27 '24 09:03 github-actions[bot]