-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image resize for srcset #357
Comments
Welcome to the Laravel world, @realcgslav 👋 This is not a silly question. Yes, this is possible with Jigsaw using its built-in Event Listeners. Within the // bootstrap.php
$events->beforeBuild(function ($jigsaw) {
// your code here that resizes images
}); ImageMagick is a popular Open Source tool with decades of great documentation and examples out there. Once you determine your file sizes and their location, you will be able to use them with the Here is a little more information about the srcset attribute |
Hi @anthonyterrell, I'm also wondering how to do this. I created a function that loops trough my collection of posts (which are .md files) and I want to replace all images with responsive images. I want to replace I wrote this:
But how can I publish my modifications to the build? |
Publishing modifications can be done using the method ->setContent($domstring), i.e.:
|
Sorry if this is silly question. I'm completely new in Laravel world.
Would be possible to resize images in Jigsaw to have ability to use them for
img srcset
tag?Something like this one: https://medium.com/codefield-community/responsive-images-and-progressive-image-loading-with-laravel-a67d5d1f42c5 or here: https://docs.spatie.be/laravel-medialibrary/v7/responsive-images/getting-started-with-responsive-images/#generating-the-necessary-images but not on upload but... Before build?
The text was updated successfully, but these errors were encountered: