registerMediaConversions runs everytime a Media models loads - unnecessary? #1883
Replies: 4 comments
-
The "thumb" conversion is created when the file is uploaded so i think it's unnecessary to run this method each time the model loads if the conversation exists already. The thumbnail is not updated when this methods runs if it already exists. |
Beta Was this translation helpful? Give feedback.
-
@martinhschei |
Beta Was this translation helpful? Give feedback.
-
@martinhschei or @VladimirVertushkov Did either of you find the answer to this? I'm running into the same problem. |
Beta Was this translation helpful? Give feedback.
-
@VladimirVertushkov @intrepidws No - i did not find a solution and i do not work with php/laravel anymore. FYI; it might be that this was used incorrectly by me at this point so maybe check if you use the trait correctly. I can vaguely remember that i had setup a little bit complex inheritance scenario between some models that used this trait, but i can not remember the details. |
Beta Was this translation helpful? Give feedback.
-
I have this trait which i add to my models. As you can see there is some logic concerning video files.
My problem with this is that registerMediaConversions runs everytime i load a media model and for the media archive in my app this could be 100+ videos on a page load. This is kinda slow.
Have i done something wrong or is it correct that registerMediaConversions runs each time a model is loaded?
Beta Was this translation helpful? Give feedback.
All reactions