robertsvensson / artiste

A small demo of the Contentful image API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ARTISTE

Artiste is a small demo implementation of the Contentful image API.

A live demo is available at http://old-soup.surge.sh/

HOW DOES IT WORK

The Contentful image API lets you manipulate images on the fly using API calls

Let's say you have the following image stored with Contentful:

Contentful image

To request this you simply request the following url: https://images.contentful.com/yadj1kx9rmg0/wtrHxeu3zEoEce2MokCSi/cf6f68efdcf625fdc060607df0f3baef/quwowooybuqbl6ntboz3.jpg

And if you want to use the Image API's support for image resizing and JPEG quality you can append one of the following parameters to the URL:

  • w — Sets the requested width
  • h — Sets the requested height
  • q — Sets the requested JPEG image quality

Example request

Example request where width is set to 349, height to 254 and the JPEG quality to 70

https://images.contentful.com/yadj1kx9rmg0/wtrHxeu3zEoEce2MokCSi/cf6f68efdcf625fdc060607df0f3baef/quwowooybuqbl6ntboz3.jpg?w=349&h=254&fit=scale&q=70

GUI screenshot

GUI screenshot

About

A small demo of the Contentful image API


Languages

Language:HTML 73.6%Language:JavaScript 17.1%Language:CSS 9.3%