Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SVG is fraught with differences across web browsers. As such, thumbnail generation would benefit from converting to a more accepted format such as png. It is nice however to be able to link to the source SVG file in case people want to open in a different program and benefit from infinite scaling. Inkscape is the main driver for conversion as it seems to be the best currently.
This patch could use some work:
I have no intention to fix any of those because they don't matter to me. I thought perhaps someone else could benefit from this and so I am submitting the PR as is.
My use of this is with shortcodes plugin. For example to have the "medium" thumbnail be displayed, but have it link to the svg can be done with the following
svg-image = '<div class="align{{ align }}">{% if link %}<a href="{{ link }}"{% if not link.startswith("http") %} data-lightbox="gallery"{% endif %}>{% endif %}{% set name,ext = image.split('.') %} <img src="{{ name+'-medium.png'}}">{% if link %}</a>{% endif %}{% if caption %}<span class="caption">{{ caption }}</span>{% endif %}</div>'