I've installed CropUp into a 6.1.1 site. I've created a CropUp data-type using 'umbracoFile' as the file property alias. I've then added this data-type to the default umbraco image media type.
I have created a bunch of crop configurations in the 'config > Eksponent.CropUp.config' file like so:
The image I've selected is straight from a camera: a jpeg at 2592x1944px.
The output of this macro is weird. I was expecting it to generate 6 images at different pixel dimensions: the first one at 936x390px, the second at 696x390, etc. However, what it outputs is 6 images with the same URL, most of which are the original pixel dimensions. The outupt is below (I've added the rendered pixel dimensions of each of the images in brackets):
<h1>homepageCarousel:</h1>
<img src="/CropUp/homepage/media/1003/dsc00285.jpg"> (this is output at 2592x1944px)
<h1>generalBanner:</h1>
<img src="/CropUp/general/media/1003/dsc00285.jpg"> (this is output at 2592x1944px)
<h1>latestNewsEvents:</h1>
<img src="/CropUp/latest/media/1003/dsc00285.jpg"> (this is output at 2592x1944px)
<h1>feature:</h1>
<img src="/CropUp/feature/media/1003/dsc00285.jpg"> (this is output at 456x304px)
<h1>sideBlockStandard:</h1>
<img src="/CropUp/side/media/1003/dsc00285.jpg"> (this is output at 2592x1944px)
<h1>sideBlockCarousel:</h1>
<img src="/CropUp/side/media/1003/dsc00285.jpg"> (this is output at 2592x1944px)
I'm not sure if this is a bug with CropUp, a problem with compatability in Umbraco 6.1.1 or if I'm doing something wrong.
I've torn a few hairs out myself because of this - but the reason is because CropUp is case-sensitive with respect to the aliases - so they need to be lowercase and shouldn't contain any characters other than letters/numbers.
As you can see, only the "feature" crop works as expected... the others get truncated at the first non-allowed character.
Did you try this on a 6.0 website? I'm using CropUp with Razor on 6.0 and I don't have any problems there. Maybe you could create a Razor file and try this in it:
Aaaaaaaahhhhhhh! That's the one, thanks so much! I thought I was being good copying the aliases directly from the config to the macro to make sure I'd discounted typos, but having to be ALL lowercase aliases would never have occurred to me!
Thanks Chriztian, and congrats on the MVP - thoroughly deserved!
Thanks Jeroen. Hard-coding the dimensions in the crops worked, but the aliases didn't because of casing issues. All sorted now, thanks. (Congrats to you too on the MVP :)!)
CropUp behaviour
Hi,
I've installed CropUp into a 6.1.1 site. I've created a CropUp data-type using 'umbracoFile' as the file property alias. I've then added this data-type to the default umbraco image media type.
I have created a bunch of crop configurations in the 'config > Eksponent.CropUp.config' file like so:
All good. The crops are visible in the media section and seem to be saved when I save and re-visit.
However, I'm now wanting to use the various crops in a template, so I set up an XSLT macro to test them, like this:
I'm not sure if this is a bug with CropUp, a problem with compatability in Umbraco 6.1.1 or if I'm doing something wrong.
Can anyone suggest what's up?
Thanks
Hi Dan,
I've torn a few hairs out myself because of this - but the reason is because CropUp is case-sensitive with respect to the aliases - so they need to be lowercase and shouldn't contain any characters other than letters/numbers.
As you can see, only the "feature" crop works as expected... the others get truncated at the first non-allowed character.
/Chriztian
Did you try this on a 6.0 website? I'm using CropUp with Razor on 6.0 and I don't have any problems there. Maybe you could create a Razor file and try this in it:
Jeroen
Aaaaaaaahhhhhhh! That's the one, thanks so much! I thought I was being good copying the aliases directly from the config to the macro to make sure I'd discounted typos, but having to be ALL lowercase aliases would never have occurred to me!
Thanks Chriztian, and congrats on the MVP - thoroughly deserved!
Thanks Jeroen. Hard-coding the dimensions in the crops worked, but the aliases didn't because of casing issues. All sorted now, thanks. (Congrats to you too on the MVP :)!)
is working on a reply...