Hello there,
I installed latest 5.x-2.1 release, and my images started to return 403 access denied. After some investigation, it seems that implementation of file_download hook is wrong:

if ('avatar_selection' == $folder) {
      $info = image_get_info(file_create_path($file));
      return array(
        'Content-type: '. $info['mime_type'],
        'Content-length: '. $info['file_size'],
    else {
      return -1;

I read that hook should not return -1 since it totally stops access, for more information please look similar issue, instead hook should return null ( commenting out "else { return -1; }" fixed my problem )
I'm not some kind of experienced programmer but hope it helps


stella’s picture

Assigned: Unassigned » stella
Status: Active » Fixed

I've changed that function so it now returns null instead of -1. I've added it to CVS and it will be included in the next release.


Anonymous’s picture

Status: Fixed » Closed (fixed)
stella’s picture

marking #178172 and #176504 as duplicates of this issue.


stella’s picture

Released in Avatar Selection 5.x-2.2.