Hi
This confuses me a bit. The Media module create and define a image preset, media_thumbnail. It define 100x100px though I see you mention 180x180 in several comments around. 7.x-1.x uses 180x180 and 7.x-2.x changes this to 100x100. It also confuses me that media_update_7211() try to define 180x180 if the preset is missing. This will leave a 7.x-2.x installation with a 180x180 and that cannot be right?

Tested and verified on a clean minimal D7 installation.

Media 7.x-1.x clean install

[square_thumbnail] => Array
    (
        [effects] => Array
            (
                [0] => Array
                    (
                        [label] => Scale and crop
                        [help] => Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.
                        [effect callback] => image_scale_and_crop_effect
                        [dimensions callback] => image_resize_dimensions
                        [form callback] => image_resize_form
                        [summary theme] => image_resize_summary
                        [module] => image
                        [name] => image_scale_and_crop
                        [data] => Array
                            (
                                [width] => 180
                                [height] => 180
                            )

                        [weight] => 0
                    )

            )

        [name] => square_thumbnail
        [label] => square_thumbnail
        [module] => media
        [storage] => 4
    )

Media 7.x-2.x clean install and 7.x-1.x upgrade.

[media_thumbnail] => Array
    (
        [label] => Media thumbnail (100x100)
        [effects] => Array
            (
                [0] => Array
                    (
                        [label] => Scale and crop
                        [help] => Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.
                        [effect callback] => image_scale_and_crop_effect
                        [dimensions callback] => image_resize_dimensions
                        [form callback] => image_resize_form
                        [summary theme] => image_resize_summary
                        [module] => image
                        [name] => image_scale_and_crop
                        [data] => Array
                            (
                                [width] => 100
                                [height] => 100
                            )

                        [weight] => 0
                    )

            )

        [name] => media_thumbnail
        [module] => media
        [storage] => 4
    )

Comments

steinmb created an issue. See original summary.

joseph.olstad’s picture

yes it would be nice to fully understand this issue. Seems like we should patch something.

joseph.olstad’s picture

ya the legacy is 180x180.

fixed the square_thumnail issue on 7.x-2.3 and 7.x-3.0-alpha7
see: #2486599: missing square_thumbnail causes Broken images in media browser and file/thumbnail

  • c8603e9 committed on 7.x-3.x
    Issue #2878678: media_thumbnail dimension mix
    

  • 05425a2 committed on 7.x-2.x
    Issue #2878678: media_thumbnail dimension mix
    
joseph.olstad’s picture

Status: Active » Fixed

fixed in 7.x-2.x dev
and 7.x-3.x dev
not a big enough of a deal to warrant a tag.
this can wait until the next release to be tagged, whenever that is.

steinmb’s picture

Looks correct. Thank you for all your hard work!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.