I have a very treaky question: how can I make an image to be downloadable in different sizes? This mechanism is required for my photogallery website.


image field

you can also download this image in:

2000x1000 - these are the links to a specific image size 3500x1500 4000x2000 resolutions


You didn't mention which version of Drupal you are using, I'm assuming 7:

This is exactly what the image module in core does, it allows you to upload one image that it then can scale, crop and more. What it doesn't do is provide the links to download. I'd package this up into a small module (I couldn't find anything similar with a quick Google search) that defines the image styles using hook_image_default_styles(). You could then possibly create a field formatter that shows a thumbnail and then the links to different image sizes (you'd get the URL for each image style with image_style_url().

Probably one of many ways of doing this but if you are comfortable writing code this could be a good way to go!

  • This is a good info. But unfortunately I can't program now. I just learning. – Webinator Aug 30 '12 at 18:52
  • I'd say give it a go - there's nothing to lose! Check out some tutorials and post another, more specific, question here as you run into trouble. If not, there may be a site building only solution but I can't think of it at the moment! – splatio Aug 30 '12 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.