const Imglab = require('@imglab/core') // Instance one of your sources const assets = new Imglab.Source( 'assets', { secureKey: 'SOURCE_SECURE_KEY', secureSalt: 'SOURCE_SECURE_SALT' } ) // Generate URL for the source Imglab.url( assets, 'image.jpeg', { width: 500, height: 600, format: 'webp' } )
require "imglab" # Instance one of your sources assets = Imglab::Source.new( "assets", secure_key: "SOURCE_SECURE_KEY", secure_salt: "SOURCE_SECURE_SALT" ) # Generate URL for the source Imglab.url( assets, "image.jpeg", width: 500, height: 600, format: :webp )
import imglab # Instance one of your sources assets = imglab.Source( "assets", secure_key="SOURCE_SECURE_KEY", secure_salt="SOURCE_SECURE_SALT" ) # Generate URL for the source imglab.url( assets, "image.jpeg", width=500, height=600, format="webp" )
# Instance one of your sources assets = Imglab.Source.new( "assets", secure_key: "SOURCE_SECURE_KEY", secure_salt: "SOURCE_SECURE_SALT" ) # Generate URL for the source Imglab.url( assets, "image.jpeg", width: 500, height: 600, format: :webp )