0

I want to change image property like resolution based on other field.Like I have a field that tells how the image will be shown. If I select a large image then minimum image resolution have to change higher.

There is no option to do it with conditional field. So Is there any other way?

2
  • I'm afraid there is not, but if you have like 4 available display settings, why don't you just add 4 fields, each wit one? And then just use dropdown field to select which one is supposed to be shown?
    – Mołot
    Sep 2, 2013 at 6:51
  • Ya that is a good idea but I have to change most of the things that I already done. So I want to change only setting. If there is any module or anything? Sep 2, 2013 at 7:02

2 Answers 2

1

It looks like you are looking for Formatter Field:

The formatter field module provides a mechanism for specifying a formatter and formatter settings to be used for displaying a field, on a per-entity basis. By default, Drupal provides formatters and settings per entity bundle, but in certain situations it is necessary to choose the formatter at the entity level.

For example, say you have a page node with an image field. Normally, you would select an image style as the formatter, and all page nodes would use that same image style. With this module, you can add a formatter field to page nodes, which is hooked up to the image field. Then when the node is created or edited, the image style can be selected per-node.

Emphasis mine.

9
  • Does this module will checks validation for minimum resolution of images. Sep 2, 2013 at 7:35
  • @SumitMadan if you will require minimum resolution and prevent upscaling in your formats, it should.
    – Mołot
    Sep 2, 2013 at 7:40
  • Prevent upscaling only controls the image cache I think not the validation of resolution. Sep 2, 2013 at 7:44
  • @SumitMadan well, right. See if it would allow you to save node if Allow Upscaling is false and image is to small. I'm sure it will not or there is a module that will prevent it - either way I've seen it work even if I can't recall all the pieces now.
    – Mołot
    Sep 2, 2013 at 7:48
  • ok I am testing it. Sep 2, 2013 at 7:52
0

Checked my condition pragmatically in hook_node_validate function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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