comur / ComurImageBundle

Image upload / crop bundle for Symfony2
105 stars 76 forks source link

Set input class #97

Closed woeden closed 5 years ago

woeden commented 7 years ago

Hello !

Thank you for your bundle, it's a very nice tool.

I just have a problem to set the input class.

Here is my config

->add('i_1440_1018', 'comur_image', array(
                'label' => 'Fullwidth',
                'uploadConfig' => array(
                    'uploadUrl' => $myEntity->getUploadRootDir(),
                    'webDir' => $myEntity->getUploadDir(),
                    'showLibrary' => true,
                    'generateFilename' => true
                ),
                'cropConfig' => array(
                    'minWidth' => 720,
                    'minHeight' => 509,
                    'aspectRatio' => true,
                    'forceResize' => false,
                    'thumbs' => array(
                        array(
                            'maxWidth' => 1440,
                            'maxHeight' => 1018,
                            'useAsFieldImage' => true  //optional
                        )
                    )
                ),'attr' => array('class' => 'img fullwidth')
                )
            )

Sadly I can't find my class the input on the view.

'attr' => array('class' => 'img fullwidth')

Can someone help me ?

Thank you ! :)

comur commented 5 years ago

Sorry I think it's too old, I close, please open a new issue if you still have any problem