Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Image Bundle Laravel Package

elendev/image-bundle

View on GitHub
Deep Wiki
Context7

ElendevImageBundle

Bundle configuration

elendev_image:
    cache_dir: 'path_to_cache_directory'
	source_dir: 'path_to_image_dir'
	cache_url: 'url/to/cache/dir'

The cache_dir configuration key is the local path to the cache directory. It's the directory where the generated files will be stored (for example : /var/www/my-website/media/cache).

The source_dir configuration key is the local path to the directory containing the images (for example : /var/www/my-website/media/original-files).

The cache_url configuration key is the url to the cache directory. If the url http://www.my-website.com redirect to the local /var/www/my-website directory, the value of this configuration key would be http://www.my-website.com/media/cache.

Use Twig's extension image method

<img src="{{image('source')}}"/>

<img src="{{image('source').resize(200, 200)}}"/>

<img src="{{image('source').rotate(180).greyScale()}}"/>

The available methods are those of the Elendev\ElendevImageBundle\ImageProxy class :

interface ImageProxy {

    ...
    
    public function resize($width, $height, $keepRatio = true, $allowEnlarge = false);
    
    /**
     * @param type $degree
     * @param type $bgcolor background color for visible parts, by default black
     */
    public function rotate($degree, $bgcolor = 0);
    
    /**
     * Do greyscale on picture
     */
    public function greyScale();

    ...

}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel