Project

rsqip

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby port of SVG LQIP
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 11

Runtime

 Project Readme

RSQIP - SVG-Based Image Placeholder... in ruby

Overview

Ruby port of npm's sqip wrapping primitive and svgo

Requirements

Installation

TODO

npm install -g svgo
go get -u github.com/fogleman/primitive
gem install rsqip

Examples

TODO

rsqip = Rsqip.new(filename).run
width, height = rsqip.img_dimensions
style = "background-size: cover; background-image: url(data:image/svg+xml;base64,${rsqip.svg_base64encoded});"
html = %(<img width="#{width}" height="#{height}" src="#{filename}" style="#{style}" alt="Add descriptive alt text">)

CLI Examples

just use npm

Licence

This is free and unencumbered software released into the public domain.