Shift the focal point per image style

Created on 31 October 2020, about 4 years ago
Updated 26 February 2024, 11 months ago

Problem/Motivation

Often it is not desirable to have the focal point of an image at its center. This could be because of other elements overlapping the image that would obscure its focus, or just for aesthetic reasons related to the design.

Proposed resolution

It appears this feature was added to the D7 version of Focal Point in #2386981: Shift the focal point per image style β†’ , but never made it to the D8 version. That patch added two fields to the Focal Point image style effects, one for shifting the focus along the x-axis and one for shifting it along the y-axis.

There are two improvements I would make over the D7 solution. The first is to permit percentage values for the focus shift, instead of just pixels. The second is to add a "force focus" checkbox to the style effect form. Selecting that option would crop the image as much as is necessary to move the focal point to the specified location. Leaving it unchecked would minimize the amount of cropping, but move the focal point closer to the target location if any cropping is needed.

✨ Feature request
Status

Active

Version

1.0

Component

Image Presets

Created by

πŸ‡ΊπŸ‡ΈUnited States jstoller

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024