DEV Community

Clark Weckmann
Clark Weckmann

Posted on • Originally published at weckmann.me on

WebLense

There is a cascade of URL-To-Image APIs out there. Most of them are pricey, overly-complicated, non-opensource and you don’t have control of the image files. WebLense takes care of this. WebLense is a self-hosted Url-To-Image API.

How To Use WebLense

Updated on January 30th, 2018

Using WebLense is incredibly simple.

"Remix

or

or

git clone https://github.com/clarkhacks/WebLense.git
cd WebLense
npm install && npm start

Enter fullscreen mode Exit fullscreen mode

API

Use Lense endpoint for API calls.

GET Required Function
url Yes URL To Capture
width No End Width
height No End Height
delay No Delay Screenshot
json No Return Json

Examples

Web

https://projectid.herokuapp.com/lense?url=https://clarkhacks.com/blog&width=1920&height=720

Enter fullscreen mode Exit fullscreen mode

jQuery

$.get('https://projectid.glitch.me/lense',
{ url: 'https://clarkhacks.com' },
function(data) {
    ...

Enter fullscreen mode Exit fullscreen mode

Out of Space?

Glitch Projects are allowed 128mb of space. The WebLense app takes up ~40mb with captured images taking up the rest.

Options

  • Clear sites Folder
  • Host WebLense somewhere else.

Reply via email

Top comments (0)