Skip to content

Instantly share code, notes, and snippets.

View alvarogarcia7's full-sized avatar

Alvaro Garcia alvarogarcia7

View GitHub Profile
@alvarogarcia7
alvarogarcia7 / better_image_tag.rb
Created June 9, 2016 14:32 — forked from pichfl/better_image_tag.rb
Liquid Image Tag for Jekyll
# Source is https://gist.github.com/pichfl/1548864
# A simple plugin for Jekyll that allows you to use {% img url "alt text" %} to add images to your posts.
# It will automatically check those images for width and height.
#
# Requires http://imagesize.rubyforge.org/
require 'image_size'
require 'open-uri'
module Jekyll