Skip to content

Latest commit

 

History

History
114 lines (87 loc) · 2.81 KB

examples.md

File metadata and controls

114 lines (87 loc) · 2.81 KB

Examples

This page demonstrates various examples of using Skymage for image transformations.

Feature Highlights

Before & After Comparison

See the difference our image transformations can make:

Blur Effect Comparison

Code Examples

```php // Install Skymage composer require daudau/skymage

// Initialize the client $skymage = new \Daudau\Skymage\Client('your-api-key');

// Generate a transformed image URL $url = $skymage->image('your-image.jpg') ->resize(800, 600) ->filter('sepia') ->blur(5) ->getUrl();


```javascript
// Install Skymage JS client
npm install skymage

// Initialize the client
const skymage = new Skymage('your-api-key');

// Generate a transformed image URL
const url = skymage.image('your-image.jpg')
    ->resize(800, 600)
    ->filter('sepia')
    ->blur(5)
    ->getUrl();

Common Transformation Recipes

Social Media Cover Image

https://demo.skymage.net/v1/daudau.cc/images/landscape.jpg?w=1200&h=630&fit=cover&p=top

E-commerce Product Thumbnail

https://demo.skymage.net/v1/daudau.cc/images/product.jpg?w=300&h=300&fit=contain&bg=white

Blog Featured Image with Filter

https://demo.skymage.net/v1/daudau.cc/images/blog.jpg?w=800&h=450&fit=cover&filt=grayscale

Profile Picture with Face Detection

https://demo.skymage.net/v1/daudau.cc/images/person.jpg?w=200&h=200&fit=crop&p=face