Project

General

Profile

Actions

Bug #97248

closed

social images are slightly cropped in EXT:seo

Added by Benjamin Robinson about 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
SEO
Start date:
2022-03-28
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
On Location Sprint

Description

I guess that the social images crop ratio of 1.91:1 defined in TYPO3 aims at an image format of 1200x628. This is a quite common format, which is often recommended, besides the format 1200x630.

Dropping an image of size 1200x630 in the page properties will result in 1200x628 with the default crop settings.

Unfortunately, if you place an image of size 1200x628, it will be cropped to 1199x628.

You currently have to upload a 1200x630 image if you want a 1200x628 result. Or change the cropping to "free" and drag the cropping frame manually.

Unfortunately the image is also regenerated by the image processor, even if everything is selected in cropping and the pixel dimensions of the result match the original. This should result in a small loss of quality.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #98118: Social images are not cropped anymore to their expected ratioClosedKevin Appelt2022-08-10

Actions
Actions #1

Updated by Kevin Appelt almost 2 years ago

  • Status changed from New to Accepted
  • Assignee set to Kevin Appelt
  • Target version set to Candidate for patchlevel
  • Complexity set to easy
  • Sprint Focus set to On Location Sprint

The system currently behaves as technically expected at this point - but not as expected by the user.


The aspect ratio is specified with the widely used value of 1.91:1. This leads purely mathematically to the described problem, because:
1200/1.91 = 628.27 => Thus, the cropped image is 628 pixels high at a width of 1200px.
628*1,91 = 1.199,48 => So the cropped image is 1199 pixels high at a height of 628px.
Facebook says "Use images that are at least 1200 x 630 pixels for the best display on high resolution devices." and "Try to keep your images as close to 1.91:1 aspect ratio as possible to display the full image in Feed without any cropping." (Source: https://developers.facebook.com/docs/sharing/webmasters/images/?locale=en_US)
So the correct aspect ratio is not necessarily 1.91:1 but only "as close as possible" to it. Mathematically, 1.9047619048:1 would be correct.


For reasons of clarity, I would configure 1200:630 as the new aspect ratio (alternatively 40:21, as a shortened notation). This even allows to directly capture the recommended image dimensions when reading the code. I guess we can still keep the "name/label" 1.91:1 as it is widely used.

With this, the image then no longer needs to be processed if it is uploaded in the correct aspect ratio. However, a short test shows that processing takes place anyway. A check whether the processing is necessary should be able to solve this problem.


This is a nice task for starters at tomorrow's Coding Night at DevDays. I'll take care of it.

Actions #2

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75382

Actions #3

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75358

Actions #4

Updated by Xenia Thiem over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75358

Actions #6

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75358

Actions #7

Updated by Xenia Thiem over 1 year ago

  • Status changed from Under Review to Resolved
Actions #8

Updated by Sascha Egerer over 1 year ago

  • Related to Bug #98118: Social images are not cropped anymore to their expected ratio added
Actions #9

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF