alev's avatar
Level 4

using responsive images without attaching them to a model

I'm looking into generating responsive images automatically. There is the powerful laravel-medialibrary package that can do this nicely.

But, it seems to be a requierement to attach each image to a model. Also it requires each images first to be uploaded through some sort of form in order to attach it to a model (and save a reference in the library).

In my project I would like to use the responsive image functionality, but since the website is static (I upload the images only once to the image folder directly), I don't see the necessity to build an upload form.

Is there a way to use laravel-medialibrary without models?

I am imagining something simple like:

<img src="{{ renderImage('public/my_image.jpg') }}">

instead of

<img src="public/my_image.jpg">

0 likes
1 reply
DivDax's avatar

Did you found a solution or a package for this? Same scenario here - simple static site with some images.

Please or to participate in this conversation.