Skip to content

ActiveStorage doesn't respect gravity variant #31518

@kieraneglin

Description

@kieraneglin

Steps to reproduce

Given a Rails 5.2.0beta2 app using ActiveStorage and mini_magick, attach a rectangular image to a model and then call it with <image>.variant(thumbnail: '100x100^', gravity: 'center', extent: '100x100')

Expected behavior

The image returned is 100px square with the excess cropped and the image centered

(centered cropping is described here and gravity is shown to work with mini_magick here)

Actual behavior

The image returned is 100px square with excess cropped, however the image is anchored on the upper left

System configuration

Rails version: 5.2.0beta2

Ruby version: 2.4.2

mini_magick version: 4.8.0

ImageMagick version: 7.0.7-15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions