SonataExtraAdminBundle icon indicating copy to clipboard operation
SonataExtraAdminBundle copied to clipboard

Image in show view does not accept the width, the height and the prefix options

Open devaneando opened this issue 6 years ago • 2 comments

According to the 'Resources/doc/show_view_types.md` file:

Available options

protected function configureShowFields(ShowMapper $showMapper)
{
    $showMapper
        ...
        ->add('picture', 'image', [
            'prefix' => '/bundles/acme/images/', // Image url prefix, default to null
            'width' => 75, // Image width, default to 50px,
            'height' => 75, // Image height, default to 50px,
        ]);
}

But the show template, does not have the prefix, the width and the height options available.

I fix this in the Pull Request #8

devaneando avatar Nov 23 '18 08:11 devaneando

Looks good to me 👍🏻

OskarStark avatar Nov 23 '18 09:11 OskarStark

@picoss , DO you think it would be possible to merge this PR? I am using your bundle in a project I am working in, and this change, even being small, will help me a lot.

devaneando avatar Nov 30 '18 09:11 devaneando