Publ: Test of image renditions

Last updated:
Source file: /home/fluffy/dev.beesbuzz.biz/tests/content/images/image renditions.md

Image rendition tests

Image rendition tests

External images

External image with width set

600

![](//placekitten.com/800/600{250} "so smol")

External image with height set

600

![](//placekitten.com/800/600{height=250} "less smol")

External image with width and height set, with different scaling modes:

Image using static path

IMG_0377.jpg

![{640,link='@images/IMG_0377.jpg'}](@images/IMG_0377.jpg)

Force absolute URLs

600IMG_0377.jpg

![{640,320,absolute=True}](//placekitten.com/800/600 | @images/IMG_0377.jpg)

Local images

alt text

![alt text](rawr.jpg "test single image")

alt textalt textalt text

alt text

![alt text](rawr.jpg "test single image")

alt text

rawr.jpg

croptest.png

croptest.pngcroptest.png

Inline image with a gallery class:

rawr.jpg
should still be a block element

Inline image with no gallery class: rawr.jpg should be inline

Paragraph-level image set without a gallery class:

rawr.jpgrawr.jpgrawr.jpg

should still be in a paragraph

such gallerysuch gallerysuch gallerysuch gallery

PNG transparency

Base image:

notsmiley.png ![](notsmiley.png)

converted to jpeg, no background:

notsmiley.png ![](notsmiley.png{format="jpg"})

converted to jpeg, black background:

notsmiley.png ![](notsmiley.png{format="jpg",background="black"})

converted to jpeg, red background using a tuple:

notsmiley.png ![](notsmiley.png{format="jpg",background=(255,0,0)})

converted to jpeg, white background using hex code:

notsmiley.png ![](notsmiley.png{format="jpg",background='#ccc'})

converted to jpeg, cyan background, multiple qualities on the spectrum:

notsmiley.pngnotsmiley.pngnotsmiley.pngnotsmiley.png

Quantization

Landscape_4.jpgLandscape_4.jpgLandscape_4.jpgLandscape_4.jpgLandscape_4.jpgLandscape_4.jpgLandscape_4.jpgLandscape_4.jpgLandscape_4.jpg

Scale algorithms

Landscape_1.jpgLandscape_1.jpgLandscape_1.jpgLandscape_1.jpgLandscape_1.jpgLandscape_1.jpgLandscape_1.jpgError loading image Landscape_1.jpg{scale_filter=‘xyzzy’} "xyzzy": Invalid scale_filter value ‘xyzzy’

Broken/parse failures

  • ![broken image](missingfile.jpg)

    Image not found: missingfile.jpg

  • ![broken spec](foo{123[]})

    Couldn’t parse image spec: foo{123[]} invalid syntax (<unknown>, line 1)

  • ![broken spec](poiu{100} foo{200})

    Couldn’t parse image spec: poiu{100} foo{200} closing parenthesis ‘}’ does not match opening parenthesis ‘(’ (<unknown>, line 1)

  • ![broken imageset](rawr.jpg rawr.jpg)

    Image not found: rawr.jpg rawr.jpg (Did you forget a |?)

  • ![broken imageset](rawr.jpg "title rawr" rawr.jpg "title 2")

    Image not found: rawr.jpg "title rawr" rawr.jpg (Did you forget a |?)

  • ![partially broken image set](rawr.jpg "rawr!" | missingfile.jpg "missing")

    partially broken image setImage not found: missingfile.jpg

  • ![too many posargs](rawr.jpg{2,3,4})

    Couldn’t parse image spec: rawr.jpg{2,3,4} Expected at most 2 positional args but 3 were given

  • ![mulitple widths](rawr.jpg{100,width=200})

    Couldn’t parse image spec: rawr.jpg{100,width=200} Got multiple values for width