How to add a responsive image to a Jekyll post:
Create a folder called assets in the root directory of your project, into which any images, downloads or any other assets are placed. They can then be linked to in the post.
Install jekyll-image-tag. This requires both Minimagick and Imagemagick to work.
You can install Minimagick with the command:
sudo gem install jekyll-minimagick
In a plugin file within your projects _plugins directory add:
Define presets in your _config.yml file:
Once you have the requirements installed, download jekyll-image-tag and copy image_tag.rb to your Jekyll _plugins folder.
Link the image from your assets folder to your post using the format:
My code looked like this:
comments powered by Disqus