diff --git a/crates/typst-library/src/visualize/image/mod.rs b/crates/typst-library/src/visualize/image/mod.rs index a13a7a207..a3a7815c2 100644 --- a/crates/typst-library/src/visualize/image/mod.rs +++ b/crates/typst-library/src/visualize/image/mod.rs @@ -84,13 +84,22 @@ pub struct ImageElem { /// /// ```example /// #image( + /// read( + /// "tetrahedron.svg", + /// encoding: none, + /// ), + /// format: "svg", + /// width: 2cm, + /// ) + /// + /// #image( /// bytes(range(16).map(x => x * 16)), /// format: ( /// encoding: "luma8", /// width: 4, /// height: 4, /// ), - /// width: 1cm, + /// width: 2cm, /// ) /// ``` pub format: Smart, diff --git a/crates/typst-library/src/visualize/image/raster.rs b/crates/typst-library/src/visualize/image/raster.rs index 22f077d9e..0a62281fe 100644 --- a/crates/typst-library/src/visualize/image/raster.rs +++ b/crates/typst-library/src/visualize/image/raster.rs @@ -221,7 +221,8 @@ pub enum ExchangeFormat { Png, /// Lossy raster format suitable for photos. Jpg, - /// Raster format that is typically used for short animated clips. + /// Raster format that is typically used for short animated clips. Typst can + /// load GIFs, but they will become static. Gif, }