57a4324fa0
- Jekyll ignore `/docs` and `/test` folders when using from root - Update Staticman config to point to correct branch and data file location - Replace `{{ base_path }}` references with `absolute_url` filter - Update documentation
1.2 KiB
1.2 KiB
title | categories | tags | |||
---|---|---|---|---|---|
Post: Image (Standard) |
|
|
The preferred way of using images is placing them in the /assets/images/
directory and referencing them with an absolute path. Prepending the filename with {% raw %}{{ site.url }}{{ site.baseurl }}/assets/images/{% endraw %}
will make sure your images display properly in feeds and such.
Standard image with no width modifier classes applied.
HTML:
{% raw %}<img src="{{ site.url }}{{ site.baseurl }}/assets/images/filename.jpg" alt="">{% endraw %}
or Kramdown:
{% raw %}![alt]({{ site.url }}{{ site.baseurl }}/assets/images/filename.jpg){% endraw %}
![Unsplash image 9]({{ site.url }}{{ site.baseurl }}/assets/images/unsplash-image-9.jpg)
Image that fills page content container by adding the .full
class with:
HTML:
{% raw %}<img src="{{ site.url }}{{ site.baseurl }}/assets/images/filename.jpg" alt="" class="full">{% endraw %}
or Kramdown:
{% raw %}![alt]({{ site.url }}{{ site.baseurl }}/assets/images/filename.jpg)
{: .full}{% endraw %}
![Unsplash image 10]({{ site.url }}{{ site.baseurl }}/assets/images/unsplash-image-10.jpg) {: .full}