~xdavidwu/xdavidwu.link

a5699c4c0f6c5c76eb04cf32cc8991309c1145c3 — Fernando Ribeiro 8 years ago e0cd65e
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" %}
1 files changed, 1 insertions(+), 1 deletions(-)

M _includes/image
M _includes/image => _includes/image +1 -1
@@ 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 %}