mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
api_docs: Better structure Image previews section.
This commit is contained in:
@@ -866,7 +866,7 @@ deactivated groups.
|
||||
|
||||
**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
|
||||
image, and optional `data-transcoded-image` attribute for images with formats
|
||||
which are not widely supported by browsers.
|
||||
@@ -1435,7 +1435,7 @@ deactivated groups.
|
||||
**Feature level 287**
|
||||
|
||||
* [Markdown message
|
||||
formatting](/api/message-formatting#image-previews): Added
|
||||
formatting](/api/message-formatting#images): Added
|
||||
`data-original-dimensions` attributes to placeholder images
|
||||
(`image-loading-placeholder`), containing the dimensions of the
|
||||
original image. This change was also backported to the Zulip 9.x
|
||||
@@ -1511,7 +1511,7 @@ releases.
|
||||
**Feature level 278**
|
||||
|
||||
* [Markdown message
|
||||
formatting](/api/message-formatting#image-previews): Added
|
||||
formatting](/api/message-formatting#images): Added
|
||||
`data-original-dimensions` attributes to placeholder images
|
||||
(`image-loading-placeholder`), containing the dimensions of the
|
||||
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**
|
||||
|
||||
* [Markdown message formatting](/api/message-formatting#image-previews):
|
||||
* [Markdown message formatting](/api/message-formatting#images):
|
||||
Image preview elements not contain a `data-original-dimensions`
|
||||
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
|
||||
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
|
||||
generate an image preview element with the following format.
|
||||
generate an image preview element with the following format:
|
||||
|
||||
``` html
|
||||
<div class="message_inline_image">
|
||||
@@ -136,6 +136,8 @@ generate an image preview element with the following format.
|
||||
</div>
|
||||
```
|
||||
|
||||
### Image-loading placeholders
|
||||
|
||||
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
|
||||
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
|
||||
and triggers a message update.
|
||||
|
||||
### Recommended client processing of image previews
|
||||
|
||||
Clients are recommended to do the following when processing image
|
||||
previews:
|
||||
|
||||
@@ -217,16 +221,18 @@ previews:
|
||||
format match what they requested.
|
||||
- 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
|
||||
original image, and optional `data-transcoded-image` attribute for
|
||||
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
|
||||
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
|
||||
dimensions of the full-size version of the image. Thumbnailing itself
|
||||
was reintroduced at feature level 275.
|
||||
|
Reference in New Issue
Block a user