Portraits#

Plone users have the option to upload a portrait to their profile. This profile is used in several places in Plone's user interface, like in the comments view.

Get self portrait#

You can request your own user portrait by issuing a GET request to the root URL appending /@portrait:

http

GET /plone/@portrait HTTP/1.1

curl

curl -i -X GET http://nohost/plone/@portrait

httpie

http http://nohost/plone/@portrait

python-requests

requests.get('http://nohost/plone/@portrait')

The server will respond with a Status 200 and the image requested (not JSON). The content type is set accordingly. One can use it directly in HTML src properties:

HTTP/1.1 200 OK
Content-Type: image/png

The server will respond with a Status 404 in case that the portrait is not set.

http

GET /plone/@portrait HTTP/1.1

curl

curl -i -X GET http://nohost/plone/@portrait

httpie

http http://nohost/plone/@portrait

python-requests

requests.get('http://nohost/plone/@portrait')
HTTP/1.1 404 Not Found

Get specific user portrait#

You can request the portrait for a specific user username by issuing a GET request to the root URL appending /@portrait/username:

http

GET /plone/@portrait/username HTTP/1.1

curl

curl -i -X GET http://nohost/plone/@portrait/username

httpie

http http://nohost/plone/@portrait/username

python-requests

requests.get('http://nohost/plone/@portrait/username')

The server will respond with a Status 200 and the image requested (not JSON). The content type is set accordingly. One can use it directly in HTML src properties:

HTTP/1.1 200 OK
Content-Type: image/png