Where to find Hubdb Image Column Type Attributes

I know this list must be somewhere in the docs, but I cannot find it anywhere.

I am using the Image column type in Hubdb. I know how to return the image source URL {{ row.image.url }} and width and height. How do I grab the alt text, loading option (lazy, etc)?

I assume there is a list somewhere, but I cannot find it.

Thanks!

Hey @redbranchmedia,

I think there’s unfortunately no “so detailed” information about each HubDB column format available.
Something I always do (and recommend) is to use the pprint filter. To display all available options.

Example:

{% set rows = hubdb_table_rows(HUBDB-ID) %}

{% for row in rows %}
{{ row.image|pprint }}
{% endfor %}

should give you

(Image: { "url" : "PATH-TO-IMAGE", "altText" : "IMAGE-ALT-TEXT", "fileId" : 123456789, "height" : 500, "type" : "image", "width" : 500 })

to get the alt-text you can use

{{ row.image["altTet"] }}

best,

Anton

Thank you! This is great advice. While I wish there were better documentation, using the print function is a great idea.