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:
parent
637e5d9934
commit
da95259743
1 changed files with 1 additions and 1 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Reference in a new issue