Creating new barebones plugin imgcache.

Eventually this will download and cache external images. Starting work on #27.
This commit is contained in:
Jason Williams
2021-01-02 15:06:56 -07:00
parent 2026e4a872
commit 0f302ec5ba
4 changed files with 41 additions and 1 deletions

View File

@@ -13,7 +13,8 @@
<div class="{{ feeditemclass }}" data-timestamp="{{ post.timestamp }}">
<div class="card">
{% if post.extra.img %}
<img class="card-img-top" src="{{ post.extra.img }}">
<!-- <img class="card-img-top" src="{{ post.extra.img }}"> -->
<img class="card-img-top" src="{{ post.extra.img | imgcache }}">
{% elseif post.extra.lat %}
<img class="card-img-top" src="https://api.mapbox.com/styles/v1/jason32dev/ckgehopjc2o1y19o09aqs4x11/static/pin-l+B05C71({{ post.extra.lng }},{{ post.extra.lat }})/{{ post.extra.lng }},{{ post.extra.lat }},14,0/545x300@2x?access_token=pk.eyJ1IjoiamFzb24zMmRldiIsImEiOiJjazFsNHd5djcwMXptM2htbW8zM3MyZGxuIn0.-TtNNGFysQPQRfGR1P8DUA">
{% endif %}