Getting error Divide by zero after installing Slimsy
Hi,
I have installed latest version of slimsy 1.1. 6 on my Umbraco 7.3.1, Even i have also tried slimsy 1.1.5 as well
when i write the GetResponsiveImageUrl on my image tag then getting Exception Dividebyzero on TypedMedia. if i dont use this one instead use GetCropUrl then works fine.
See the below image. Any help will be appreciated!
The problem here is that Model.ImageWidth from your custom model is either 0 or null and so the ratio which is required for the image to be responsive cannot be worked out hence the exception.
Getting error Divide by zero after installing Slimsy
Hi,
I have installed latest version of slimsy 1.1. 6 on my Umbraco 7.3.1, Even i have also tried slimsy 1.1.5 as well
when i write the GetResponsiveImageUrl on my image tag then getting Exception Dividebyzero on TypedMedia. if i dont use this one instead use GetCropUrl then works fine.
See the below image. Any help will be appreciated!
Hi there, could you please post your Razor with the GetResponsiveImageUrl method? Jeavon
Hi,
Below is my partial's code
@using Umbraco.Web @using Umbraco.Web.Models @model Promenaden.Web.Models.NewsSectionModel @{
}
The problem here is that
Model.ImageWidth
from your custom model is either 0 or null and so the ratio which is required for the image to be responsive cannot be worked out hence the exception.Hi Jeavon,
Quick help will be appreciated. Everything is ready in this project but responsive image have to fix.
It is very strange that i am getting error on Typedmedia method instead of ResponsiveImage method.
Yasir
Hi,
I have just notice one thing that when i installed the slimsy then it gave me error of HtmlAgility 1.4.6 while Umbraco 7.3.1 has version 1.4.9.0
see the scree below
Slimsy v1.1.6 doesn't have this issue, you should update!
Hi,
Thanks Jevon! i have checked my code which was calculating initial width having problem and given value 0.
so every thing is working fine.
i have a new question that how can i can override slimsy parameter with mine
like i see that slimsy generate querystring with mode=pad but i want to override it with mine like mode=crop
How can i do it?
Slimsy will use mode=crop as long as you are using it with a Image Cropper data type?
Do you have 10 min to have a chat on skype?
I am scratching my head since 2-3 hours with slimsy and images.
Please help me :)
My skype id is aizalogics
I cant understand that why is slimsy not getting correct height and width from my section.
can you please help me Jeavon?
Are you on the Umbraco Community Slack?
Sounds like your images are not being correctly sized by css, make sure you read the documentation for Slimmage here
Why slimsy is resizing the image instead cropping?
I have image in image cropper without any crop defined and image size is 2048*1224 and focal point is centered.
my section size is 1228 * 850 but slimsy is resized the image to 1280 * 789.
No i am not on Umbraco community slack
Do you have some minutes to look at my problem over skype?
is working on a reply...