Images
Images may be added to your page using the image syntax described on this page.
Adding images
There are two key ways to point to which images you would like to add to your page, locally or globally. A local image is one that is stored within the websites own image folder. A global image is one that is accessible via the web (it could still be in your local image folder) and is accessed using the raw image URL.
Local images
To include images in your pages that are local to your own website, you must first add them to the images folder.
After that, they can be added to your page with the command shown below. The ID must be unique for each image to allow referencing.
Global images
You can also point directly to a desired image using it’s address. For example, to point to this image we simply use the following code.
Notice that the ‘file’ argument has been replaced with an argument named ‘src’ (short for source) to tell the system that it is now being passed a direct link.
Alt text
You can also add an image caption and alternative image text. If you do not give alternative text, this defaults to the image caption. Alt text can be used to provide extra context for screen readers, or in the event that the image fails to load for some reason.
Size
By default, images are constrained to stay just slightly narrower than the full width of the text (2/3rds).
AutoNOTE support three alternative sizes for images.
These may be chosen by setting the size
parameter to sm
, md
or lg
.
Small - sm (1/4 * text-width)
Medium - md (1/2 * text-width)
Large - lg (full text-width)
Custom Sizes
If these sizes aren’t right for you, then you can alternatively use the size-custom
parameter.
This parameter takes a value from 1-12
, with 1 being 1/12 of the text-width and 12 being full text-width.
Position
AutoNOTE will centre images by default.
To change this behavior for any image, simply set the position
parameter to left
or right
. Here are some examples:
Referencing
You can reference any image on the page so long as it has a unique id. This will produce a link with the number automatically populated by AutoNOTE. For example, . Clicking on these links will scroll the page to the referenced image.
This is achieved using the following code, simply replace the id in the arguments with the id of the image you wish to reference: