Skip to content
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

Add support for loading attribute #1730

Merged
merged 2 commits into from
Feb 11, 2020
Merged

Conversation

freekmurze
Copy link
Member

No description provided.

@@ -73,7 +72,7 @@ return [
* images. By default we optimize for filesize and create variations that each are 20%
* smaller than the previous one. More info in the documentation.
*
* https://docs.spatie.be/laravel-medialibrary/v8/advanced-usage/generating-responsive-images
* https://docs.spatie.be/laravel-medialibrary/v7/advanced-usage/generating-responsive-images
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be v8?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right!

Copy link
Contributor

@willemvb willemvb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! (Except for the docs version maybe?)

@freekmurze freekmurze merged commit f34400c into v8 Feb 11, 2020
@freekmurze freekmurze deleted the add-support-for-loading-attribute branch February 11, 2020 12:49
config/medialibrary.php Show resolved Hide resolved
docs/installation-setup.md Show resolved Hide resolved
Copy link
Member

@sebastiandedeyne sebastiandedeyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe it always makes sense to tie the loading attribute value to conversions. It's okay to have there, but there should also be a way to modify it when rendering the image in HTML, e.g. {{ $media->lazy() }}.

.editorconfig Show resolved Hide resolved
@freekmurze
Copy link
Member Author

This was at the request of @willemvb that we tied it to the conversion. Should anybody want a function to set it manually, I'd be open for a PR that adds that.

@willemvb
Copy link
Contributor

@freekmurze hmm must be some kind of misunderstanding, since my initial suggestion (in Slack) was something like $yourModel->getFirstMedia()->loading('eager')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants