I followed the blog post on umbraco.com about slimmage/slimsy but cannot figure out why. I have the javascript in place(first load), ive installed the Slimresponse nuget package to autofix the noscript tags, im calling the image like this(its a clean umb 7.2.1) :
You're welcome! I'm guessing it's something to do with the new height support. Updating Slimsy to the new version of Slimmage is on my list, so I'll watch out for this (and hopefully fix it) then.
yeah something like that :) And no worries about updating, since this post is here now and if we put up a sign on the package. The only reason why i bumped into it like this was because i followed that blog post where it said just go get it at github :)
Getting a "value cannot be null" YSOD
Hey there :)
I followed the blog post on umbraco.com about slimmage/slimsy but cannot figure out why. I have the javascript in place(first load), ive installed the Slimresponse nuget package to autofix the noscript tags, im calling the image like this(its a clean umb 7.2.1) :
The image has the the cropper set as a property replacement for the umbracoFile. Ive tried to resave the image but still getting the thing below.
Error:
Hi Rasmus,
Could you view the rendered url of the image in the html and paste it here?
I'm guessing you need to resave the media after you switched it from upload to cropper.
Jeavon
I tried as the first thing going in just setting a new focal point and saving the image cause i thought of the same thing.
Here is what it spits out:
Hmm, and if you paste that url directly into the browser you get that YSOD, right?
I think its the heightratio=undefined in the data-slimmage attribute. I can't understand how that could be differnt to the data-src....!!!
Hmm actually it works if i just paste the url in .. hmm
This is how i output it :
And with heightratio=undefined?
If i do like this :
It still fails But if i do like the above and set the cropratiomode to width instead it works but gussing its not really doing its job.
Is the output you posted from the rendered Html (view source) or from the DOM?
Oh i think its from the DOM.
this is DOM :
/media/1009/atlantis-win_20140828_060248.jpg?center=0.42,0.4125&mode=crop&width=1280&heightratio=undefined&slimmage=true&rnd=130673851540000000
And its not working
This is the source:
/media/1009/atlantis-win_20140828_060248.jpg?center=0.42,0.4125&mode=crop&width=400&heightratio=1&slimmage=true&rnd=130673851540000000
The source works because heightratio is 1 i guess, could it be that the slimmage is not working 100%. I got the newest one off github.
https://github.com/imazen/slimmage/blob/master/slimmage.js
Could be, there have been a lot of updates recently.
Could you try with this one? https://raw.githubusercontent.com/Jeavon/Slimsy/master/Slimsy/Scripts/slimmage.js
You are a savoir indeed !
That version works, the newest just is version like 0.4.1 ish.
THX man !
You're welcome! I'm guessing it's something to do with the new height support. Updating Slimsy to the new version of Slimmage is on my list, so I'll watch out for this (and hopefully fix it) then.
yeah something like that :) And no worries about updating, since this post is here now and if we put up a sign on the package. The only reason why i bumped into it like this was because i followed that blog post where it said just go get it at github :)
FYI, I have now have a version of Slimmage v0.4.1 which works with Slimsy. You can get it from here.
is working on a reply...