Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
api_docs: Better structure Image previews section.
Karl Stolley85e6cec1dbdd
diff --git a/api_docs/changelog.md b/api_docs/changelog.mdindex 3bbffc4e223..62a09ceb24d 100644--- a/api_docs/changelog.md+++ b/api_docs/changelog.md@@ -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 originalimage, and optional `data-transcoded-image` attribute for images with formatswhich 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 theoriginal 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 theoriginal 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.diff --git a/api_docs/message-formatting.md b/api_docs/message-formatting.mdindex a69c012213c..dd7ff7171c7 100644--- a/api_docs/message-formatting.md+++ b/api_docs/message-formatting.md@@ -121,10 +121,10 @@ the href for those is the default behavior of the link that alsoencodes the channel alongside the data-stream-id field, but clientscan override that default based on `web_channel_default_view` setting.-## Image previews+## ImagesWhen 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 atthe time the message is sent, the `img` element will be a temporaryloading indicator image and have the `image-loading-placeholder`@@ -168,6 +170,8 @@ backlogged, an individual message containing multiple image previewsmay be re-rendered multiple times as each image finishes thumbnailingand triggers a message update.+### Recommended client processing of image previews+Clients are recommended to do the following when processing imagepreviews:@@ -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 theoriginal image, and optional `data-transcoded-image` attribute forimages 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` spinnerimages, 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 thedimensions of the full-size version of the image. Thumbnailing itselfwas reintroduced at feature level 275.