Jeavon / Slimsy

Effortless Responsive & Lazy Images with LazySizes and Umbraco
MIT License
72 stars 23 forks source link

How do dynamicly size immages? #78

Closed Eaglef90 closed 3 months ago

Eaglef90 commented 3 months ago

So I have gotten everything set up as best I could following the instructions on the GitHub main page and can even get the image to render but I can't figure out how to get it to dynamically set the size. I tried the slimsy-picture tag but if I remove the height or width I get a "dived by 0 error" which means I have to force a size onto the picture and, depending on the picture, that warps it. I have tried the img data-srcset method but can't get the image to render and looking at the example I must, once again, set a size on it. I have tried to dig through the source code for the v6 example but I can't make heads or tails of it.

I don't want to be hard-coding image sizes as that defeats the purpose of responsive design and if I hard code say 423x423 for an image it will look fine on a desktop but then on mobile it takes up to much space.

Is there a more beginner friendly example and explanation of how to get Slimsy working? Is Slimsy even meant for what I want (I only know of Simly cause I was asking in a discord how to dynamically resize RTE images and someone said to use this program)?

I know I have asked a few, probably stupid, questions already but I am not an expert at programming by far so any guidance, explained for a very stupid person, would be appreciated.

Eaglef90 commented 3 months ago

I know your probibly a very busy person and with this being a free package I am going to look at paying an Umbraco professional to see if they can get this working for me. Sorry to have bothered you.

Jeavon commented 3 months ago

@Eaglef90 you can find me on Discord if you need to chat about what you are doing

Eaglef90 commented 3 months ago

Thanks I reached out on discord.