All Projects → shrinerb → Shrine Imgix

shrinerb / Shrine Imgix

Licence: mit
Imgix integration for Shrine

Programming Languages

ruby
36898 projects - #4 most used programming language
processing
702 projects

Labels

Projects that are alternatives of or similar to Shrine Imgix

Dnsfs
Store your data in others DNS revolvers cache
Stars: ✭ 696 (+5700%)
Mutual labels:  storage
Kingbus
A distributed MySQL binlog storage system built on Raft
Stars: ✭ 798 (+6550%)
Mutual labels:  storage
Openebs
Leading Open Source Container Attached Storage, built using Cloud Native Architecture, simplifies running Stateful Applications on Kubernetes.
Stars: ✭ 7,277 (+60541.67%)
Mutual labels:  storage
Conf
Simple config handling for your app or module
Stars: ✭ 707 (+5791.67%)
Mutual labels:  storage
Libaums
Open source library to access USB Mass Storage devices on Android without rooting your device
Stars: ✭ 769 (+6308.33%)
Mutual labels:  storage
Spec
Container Storage Interface (CSI) Specification.
Stars: ✭ 799 (+6558.33%)
Mutual labels:  storage
Ffdl
Fabric for Deep Learning (FfDL, pronounced fiddle) is a Deep Learning Platform offering TensorFlow, Caffe, PyTorch etc. as a Service on Kubernetes
Stars: ✭ 640 (+5233.33%)
Mutual labels:  storage
Storm React Native
⚛️⚡️ AsyncStorage manager library for React Native
Stars: ✭ 10 (-16.67%)
Mutual labels:  storage
Api
SODA API is an open source implementation of SODA API Standards for Data and Storage Management.
Stars: ✭ 795 (+6525%)
Mutual labels:  storage
Peergos
A p2p, secure file storage, social network and application protocol
Stars: ✭ 895 (+7358.33%)
Mutual labels:  storage
Defaults
Swifty and modern UserDefaults
Stars: ✭ 734 (+6016.67%)
Mutual labels:  storage
Jsftp
Light and complete FTP client implementation for Node.js
Stars: ✭ 766 (+6283.33%)
Mutual labels:  storage
Gluster Kubernetes
GlusterFS Native Storage Service for Kubernetes
Stars: ✭ 822 (+6750%)
Mutual labels:  storage
Minio
High Performance, Kubernetes Native Object Storage
Stars: ✭ 30,698 (+255716.67%)
Mutual labels:  storage
Data Engineering
Wraps the DB by opening a REST API for storing and retrieving documents info & recommendations
Stars: ✭ 9 (-25%)
Mutual labels:  storage
Redux Storage
Persistence layer for redux with flexible backends
Stars: ✭ 681 (+5575%)
Mutual labels:  storage
Dexie.js
A Minimalistic Wrapper for IndexedDB
Stars: ✭ 7,337 (+61041.67%)
Mutual labels:  storage
Proxy Storage
Provides an adapter for storage mechanisms (cookies, localStorage, sessionStorage, memoryStorage) and implements the Web Storage interface
Stars: ✭ 10 (-16.67%)
Mutual labels:  storage
Android Storage
Create, read, delete, append, encrypt files and more, on internal or external disk spaces with a really simple API
Stars: ✭ 855 (+7025%)
Mutual labels:  storage
Sheepdog
Distributed Storage System for QEMU
Stars: ✭ 896 (+7366.67%)
Mutual labels:  storage

Shrine::Storage::Imgix

Provides Imgix integration for Shrine.

Imgix is a service for processing images on the fly, and works with files stored on external services such as AWS S3 or Google Cloud Storage.

Installation

gem "shrine-imgix"

Configuring

Load the imgix plugin with Imgix client settings:

Shrine.plugin :imgix, client: {
  host:             "your-subdomain.imgix.net",
  secure_url_token: "abc123",
}

You can also pass in an Imgix::Client object directly:

require "imgix"

imgix_client = Imgix::Client.new(
  host:             "your-subdomain.imgix.net",
  secure_url_token: "abc123",
)

Shrine.plugin :imgix, client: imgix_client

Path prefix

If you've configured a "Path Prefix" on your Imgix source, and you also have :prefix set on your Shrine storage, you'll need tell the imgix plugin to exclude the storage prefix from generated URLs:

Shrine.plugin :imgix, client: ..., prefix: false

Usage

You can generate an Imgix URL for a Shrine::UploadedFile object by calling #imgix_url:

photo.image.imgix_url(w: 150, h: 200, fit: "crop")
#=> "http://my-subdomain.imgix.net/943kdfs0gkfg.jpg?w=150&h=200&fit=crop"

See the Imgix docs for all available URL options.

Rails

If you're using imgix-rails and want to use the ix_* helpers, you can use #imgix_id to retrieve the Imgix path:

<%= ix_image_tag photo.image.imgix_id, url_params: { w: 300, h: 500, fit: "crop" } %>

Purging

If you want images to be automatically purged from Imgix on deletion, you can set :purge to true:

Shrine.plugin :imgix, client: ..., purge: true

You can also purge manually with Shrine::UploadedFile#imgix_purge:

photo.image.imgix_purge

Note that purging requires passing the :api_key option to your Imgix client.

Development

You can run the test suite with:

$ bundle exec rake test

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].