Using different crops for different variants
One of UploadKit's more advanced features is the ability to restrict upload fields to particular variants. This doesn't immediately sound that useful, but it lets you do some interesting things:
- Offer products in multiple shapes, and have UploadKit automatically crop the uploaded images to the correct aspect ratio depending on the selected shape
- Offer products in multiple sizes and ensure that the uploaded images are high enough resolution for each size
- Offer different pricing depending on the file format that the visitor provides
- ... and more!
Let's assume you are offering framed prints in two different shapes: 40 x 30cm (i.e. 4:3 ratio) and 48 x 27cm (i.e. 16:9 ratio). You'll have the variants set up like this:
To have UploadKit crop the uploaded images to the right size (and even let customers choose their crop restricted to the right shape!), you'll first create an upload field targeted to the first variant. Enable cropping, and set 'Limit them to a preset aspect ratio', entering 4:3:
Of course if we wanted to allow horizontal or vertical images, we could enter 4:3, 3:4.
Now restrict this upload field just to your 40 x 30cm variant, under product targeting:
(We've chosen to enable this field on all products, which means we could sell different types of frames in this size with UploadKit appearing on all of them without having to create hundreds of upload fields; if a product doesn't have a 40 x 30cm variant, the field won't appear.)
We'll then save this field and add a second upload field, this time with a 16:9 aspect ratio and where Size equals 48 x 27cm. Now when we visit our product page, we'll see that after uploading an image, our crop options automatically show up depending on the selected variant. Magic!
This is just an example, of course: instead of aspect ratio, you could change the allowed file types, or minimum image size, or any of the other options UploadKit allows. Time to get creative!