I did merge your MR at first and then reverted it because I had some thoughts.
There is a reason we dont use the html output in the api.
The reason for that is in the API we want to deal with the raw values as the api outputs data which a computer can understand and this computer can then reuse this.
@jaapjansma in that case I'm gonna leave it for you. Cause as I see now, the getfields API doesn't return the field output type.
More modifications will be needed and the WordPress plugin will also need to be updated
I mean it doesn't return the field type if it's a custom link or raw value etc.
if the API returned that as well, then it just needs to return the URL without the html and other systems can format the URL as they want. It will be easier to distinguish between a normal text and a URL
hmmm it didn't work for raw field output. For some reason it's outputting the value as "1".
Custom field :
Field config :
API result :
But changing the field to File Download Link and checking "Only return URL" did work. In any case, I would have to modify the WordPress plugin for it to output as an image.