Skip to content

Publishing Fails due to 20MB limit on images #1232

@CodingSamurai

Description

@CodingSamurai

Description of the bug

We were recently noticing issues where some of our articles wouldn’t be pushed to apple news properly upon publishing, and upon further inspection, we noticed that we were getting this error:

There has been an error with the Apple News API: INVALID_DOCUMENT – Invalid Content-Length [35968030] greater than 20000000 for stream

regarding the file size of some of our featured images.

While we’ve identified the issue and are working on our end to avoid crossing this file size limit again, we were just wondering if it was possible to put in some checks pre-publishing to warn users that the image is too large, or put in image resizing code that would automatically resize it down before publishing, or allow a global default image to be used if there are any errors around the image to at least allow it to successfully publish.

Thank you

Steps To Reproduce

  1. Create an article with a very large featured image (over 20MB)
  2. Publish article in WordPress admin
  3. Verify that the article does NOT appear in your Apple News account
  4. Look at logs to see that an error was generated:

There has been an error with the Apple News API: INVALID_DOCUMENT – Invalid Content-Length [35968030] greater than 20000000 for stream

  1. Change the featured image to an image smaller than 20MB
  2. Publish article again in WordPress admin
  3. Verify that the article DOES now appear in your Apple News account

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions