Hi,

is it possible to restrict the user picture upload to .jpg file format only?

Thanks in advance and regards,
Stefan

Comments

dawehner’s picture

you can hook_form_alter user_profile_form and overwrite the validation in #validate of $form.

Then you could add another validation
or
remove 'user_validate_picture', copy this function and replace with a function which checks also for filetype.

dave reid’s picture

Status: Active » Fixed
dave reid’s picture

Issue tags: +user pictures

Fixing tag

design.er’s picture

@dereine: Unfortunately, this is too difficult for me. As my nick describes I'm a designer. :)
Nevertheless, thank you very much for your help! Maybe one day I'll get it. *optimist*

Status: Fixed » Closed (fixed)
Issue tags: -user pictures, -upload, -avater, -restrict, -jpg, -file format

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