0

I am creating a checkbox field in my content type and I want images to be displayed as checkboxes option.

In Drupal 7, there is a feature to add images as field list, but I am unable to give the full path for that image.

See the below screenshot for better understanding. enter image description here

I cannot give my image path as http://localhost/sites/default/.. because the base path changes when we move to the Production. How can I achieve this?

1

Your image path needs a / before sites. Should be "/sites/default/files/test-image1.jpg"

If you don't have a / at the start, then it appends your url code to whatever page you're on. Example: node/1/sites/default/files/test-image1.jpg which is not what you want (broken image since it doesn't exist)

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.