mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
api_docs: Better structure Image previews section.
This commit is contained in:
@@ -866,7 +866,7 @@ deactivated groups.
|
|||||||
|
|
||||||
**Feature level 336**
|
**Feature level 336**
|
||||||
|
|
||||||
* [Markdown message formatting](/api/message-formatting#image-previews): Added
|
* [Markdown message formatting](/api/message-formatting#images): Added
|
||||||
`data-original-content-type` attribute to convey the type of the original
|
`data-original-content-type` attribute to convey the type of the original
|
||||||
image, and optional `data-transcoded-image` attribute for images with formats
|
image, and optional `data-transcoded-image` attribute for images with formats
|
||||||
which are not widely supported by browsers.
|
which are not widely supported by browsers.
|
||||||
@@ -1435,7 +1435,7 @@ deactivated groups.
|
|||||||
**Feature level 287**
|
**Feature level 287**
|
||||||
|
|
||||||
* [Markdown message
|
* [Markdown message
|
||||||
formatting](/api/message-formatting#image-previews): Added
|
formatting](/api/message-formatting#images): Added
|
||||||
`data-original-dimensions` attributes to placeholder images
|
`data-original-dimensions` attributes to placeholder images
|
||||||
(`image-loading-placeholder`), containing the dimensions of the
|
(`image-loading-placeholder`), containing the dimensions of the
|
||||||
original image. This change was also backported to the Zulip 9.x
|
original image. This change was also backported to the Zulip 9.x
|
||||||
@@ -1511,7 +1511,7 @@ releases.
|
|||||||
**Feature level 278**
|
**Feature level 278**
|
||||||
|
|
||||||
* [Markdown message
|
* [Markdown message
|
||||||
formatting](/api/message-formatting#image-previews): Added
|
formatting](/api/message-formatting#images): Added
|
||||||
`data-original-dimensions` attributes to placeholder images
|
`data-original-dimensions` attributes to placeholder images
|
||||||
(`image-loading-placeholder`), containing the dimensions of the
|
(`image-loading-placeholder`), containing the dimensions of the
|
||||||
original image. Backported change from feature level 287.
|
original image. Backported change from feature level 287.
|
||||||
@@ -1524,7 +1524,7 @@ No changes; feature level used for Zulip 9.0 release.
|
|||||||
|
|
||||||
**Feature level 276**
|
**Feature level 276**
|
||||||
|
|
||||||
* [Markdown message formatting](/api/message-formatting#image-previews):
|
* [Markdown message formatting](/api/message-formatting#images):
|
||||||
Image preview elements not contain a `data-original-dimensions`
|
Image preview elements not contain a `data-original-dimensions`
|
||||||
attribute containing the dimensions of the original image.
|
attribute containing the dimensions of the original image.
|
||||||
|
|
||||||
|
@@ -121,10 +121,10 @@ the href for those is the default behavior of the link that also
|
|||||||
encodes the channel alongside the data-stream-id field, but clients
|
encodes the channel alongside the data-stream-id field, but clients
|
||||||
can override that default based on `web_channel_default_view` setting.
|
can override that default based on `web_channel_default_view` setting.
|
||||||
|
|
||||||
## Image previews
|
## Images
|
||||||
|
|
||||||
When a Zulip message is sent linking to an uploaded image, Zulip will
|
When a Zulip message is sent linking to an uploaded image, Zulip will
|
||||||
generate an image preview element with the following format.
|
generate an image preview element with the following format:
|
||||||
|
|
||||||
``` html
|
``` html
|
||||||
<div class="message_inline_image">
|
<div class="message_inline_image">
|
||||||
@@ -136,6 +136,8 @@ generate an image preview element with the following format.
|
|||||||
</div>
|
</div>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Image-loading placeholders
|
||||||
|
|
||||||
If the server has not yet generated thumbnails for the image yet at
|
If the server has not yet generated thumbnails for the image yet at
|
||||||
the time the message is sent, the `img` element will be a temporary
|
the time the message is sent, the `img` element will be a temporary
|
||||||
loading indicator image and have the `image-loading-placeholder`
|
loading indicator image and have the `image-loading-placeholder`
|
||||||
@@ -168,6 +170,8 @@ backlogged, an individual message containing multiple image previews
|
|||||||
may be re-rendered multiple times as each image finishes thumbnailing
|
may be re-rendered multiple times as each image finishes thumbnailing
|
||||||
and triggers a message update.
|
and triggers a message update.
|
||||||
|
|
||||||
|
### Recommended client processing of image previews
|
||||||
|
|
||||||
Clients are recommended to do the following when processing image
|
Clients are recommended to do the following when processing image
|
||||||
previews:
|
previews:
|
||||||
|
|
||||||
@@ -217,16 +221,18 @@ previews:
|
|||||||
format match what they requested.
|
format match what they requested.
|
||||||
- No other processing of the URLs is recommended.
|
- No other processing of the URLs is recommended.
|
||||||
|
|
||||||
**Changes**: In Zulip 10.0 (feature level 336), added
|
### Changes to image formatting
|
||||||
|
|
||||||
|
**In Zulip 10.0** (feature level 336), added
|
||||||
`data-original-content-type` attribute to convey the type of the
|
`data-original-content-type` attribute to convey the type of the
|
||||||
original image, and optional `data-transcoded-image` attribute for
|
original image, and optional `data-transcoded-image` attribute for
|
||||||
images with formats which are not widely supported by browsers.
|
images with formats which are not widely supported by browsers.
|
||||||
|
|
||||||
**Changes**: In Zulip 9.2 (feature levels 278-279, and 287+), added
|
**In Zulip 9.2** (feature levels 278-279, and 287+), added
|
||||||
`data-original-dimensions` to the `image-loading-placeholder` spinner
|
`data-original-dimensions` to the `image-loading-placeholder` spinner
|
||||||
images, containing the dimensions of the original image.
|
images, containing the dimensions of the original image.
|
||||||
|
|
||||||
In Zulip 9.0 (feature level 276), added `data-original-dimensions`
|
**In Zulip 9.0** (feature level 276), added `data-original-dimensions`
|
||||||
attribute to images that have been thumbnailed, containing the
|
attribute to images that have been thumbnailed, containing the
|
||||||
dimensions of the full-size version of the image. Thumbnailing itself
|
dimensions of the full-size version of the image. Thumbnailing itself
|
||||||
was reintroduced at feature level 275.
|
was reintroduced at feature level 275.
|
||||||
|
Reference in New Issue
Block a user