-
Notifications
You must be signed in to change notification settings - Fork 186
Images
When images are uploaded, the original image will be saved, and then versions of that image at various sizes will be created, so bandwidth is not wasted loading a huge image when a tiny one is needed.
If an image does not fit the ratio of it's image type, the resized images will be sized so that the smallest dimension fits into the expected size. When the resized images are displayed in the reference client, they are centered and scaled so the display container is filled, and excess image is hidden.
Example: if you upload a 200 x 400 pixel image for an avatar, the smallest avatar image will be 60 x 150. A square area in the center of the image will be shown, with the full 60 pixels of one axis, and the center 60 pixels of the other axis.
The size names are
- tiny
- small
- medium
- large
- original
The call to get any image directly is
https://{{url}}:{{port}}/ob/images/:imageHash
https://{{url}}:{{port}}/ob/header/:peerID/:size
Ratio: 3.5
Sizes
- tiny: 315x90
- small: 630x180
- medium: 1260x360
- large: 2520x720
- original
https://{{url}}:{{port}}/ob/avatar/:peerID/:size
Ratio: 1
Sizes
- tiny: 60x60
- small: 120x120
- medium: 240x240
- large: 480x480
- original
https://{{url}}:{{port}}/ob/images/:imageHash
Ratio: 1
Sizes
- tiny: 120x120
- small: 240x240
- medium: 480x480
- large: 960x960
- original