This seems like it should be really simple. I set the field for an image asset, linked it to the entry type I want it associated to, and then uploaded the image in the cms to the folder I specified.
So now, when I call {{ entry.featureImage }}
it should return the object of that image. I want its URL, because I want to place it in a special image tag. <img class="img-responsive" src="{{ entry.featureImage }}">
Now I know this returns an error that says "Object could not be converted to string". Because I need to modify it to get the string of the URL. How can I do this? I feel like I've tried everything and scoured the docs and internet. I cant just attach a .getURL()
or .url
like would make a whole ton of sense. I've even set entry.featureImage as a variable and then called image.url on it. Or .getImg('featureImage')
maybe? But it needs the class of img-responsive.
This needs to be possible so that the CMS can allow for images to be specified and uploaded for specific spots in the website.