Drupal User Pictures ("Avatars") image style is not applied? Default image size used? This will do the trick ...

Drupal User Pictures ("Avatars") image style is not applied? Default image size used? This will do the trick ...

Did you run into the same problem as I did: The user default picture (avatars) is not being processed by imagecache (image-styles)?

In my case the default picture showed up in original size for example below the node content, in comments and everywhere else. Uploaded user pictures worked fine, but the image path in the output was always the direct file path, not an image style path!

After a lot of investigations I found out that the path must be a stream-wrapper URL and not a native file path URL!!!

Wrong:

sites/default/files/user_pictures/default.png

Right:

public://user_pictures/default.png

And there is not even a little sentence that documents this silly behaviour!

Finally I found this two years old discussion that never came to an end: https://www.drupal.org/node/1919730

I hope the documentation will become better in the future. Help me and comment that issue, if you ran into the same trap. And feel free to leave a comment here.

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.

Weitere Informationen über Formatierungsoptionen