Skip to content

Commit

Permalink
Correct parameters in config.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixney-William committed Sep 21, 2020
1 parent b7bc744 commit 436a3f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Inspired by https://github.com/spatie/statamic-responsive-images
## Installation
`composer require "pixney/statamic-image-generator"`

`php artisan vendor:publish` -> image-generator-configuration
`php artisan vendor:publish` -> image-generator-views

### Tag
`{{ picture:image alt="{{image.alt}}" class="image another-image-class" attributes='data-nameit="add value here"'}}`

Expand Down
11 changes: 5 additions & 6 deletions config/config.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<?php
return [
'extExceptions' => ['svg'],
'directories' =>
[
'directories' => [
'work' => [
'small' => [
'params' => ['width' => 818, 'quality' => 90, 'fit' => 'crop'],
'params' => ['w' => 818, 'q' => 90, 'fit' => 'crop'],
'formats' => ['jpg', 'webp'],
'queries' => [
'media' => '(max-width: 414px)'
]
],
'medium' => [
'params' => ['width' => 1818, 'quality' => 90, 'fit' => 'crop'],
'params' => ['w' => 1818, 'q' => 90, 'fit' => 'crop'],
'formats' => ['jpg', 'webp'],
'queries' => [
'media' => '(max-width: 1200px)'
Expand All @@ -21,14 +20,14 @@
],
'news' => [
'small' => [
'params' => ['width' => 818, 'quality' => 90, 'fit' => 'crop'],
'params' => ['w' => 818, 'q' => 90, 'fit' => 'crop'],
'formats' => ['jpg', 'webp'],
'queries' => [
'media' => '(max-width: 414px)'
]
],
'medium' => [
'params' => ['width' => 1818, 'quality' => 90, 'fit' => 'crop'],
'params' => ['w' => 1818, 'q' => 90, 'fit' => 'crop'],
'formats' => ['jpg', 'webp'],
'queries' => [
'media' => '(max-width: 1200px)'
Expand Down

0 comments on commit 436a3f4

Please sign in to comment.