Do not assume images would be placed in /assets/images/

In order to add an image to a post, just use the following syntax:

{% include image image_path="/full/path/to/MyPostImage.png" caption="The optional image caption" %}

or

{% include image image_path="https://example.com/images/MyPostImage.png" caption="The optional image caption" alt="The optional alt text" %}
This commit is contained in:
Fernando Ribeiro 2016-11-08 20:15:41 +00:00 committed by GitHub
parent 637e5d9934
commit da95259743

View file

@ -3,7 +3,7 @@
{% if include.image_path contains "://" %}
"{{ include.image_path }}"
{% else %}
"{{ include.image_path | prepend: "/assets/images/" | absolute_url }}"
"{{ include.image_path | absolute_url }}"
{% endif %}
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
{% if include.caption %}