Skip to content

images referenced in htl templates do not work #1993

@kylehodgson

Description

@kylehodgson

A file that references an image like this will work: <img src="/images/b23e.jpg"> is re-written to <img src="/_file/images/b23e.jpg?sha=3c2261b5fe1286e05943aebd02bc893d2ee62109baaa22f7ae3028107e01e510">, pointing to the deployed file with cache busting hash in place.

whereas code that references an image like this will not:

```js
if (observable.params.oem=="BRM AERO") {
    display(html`
        <div class="card" style="min-height: 210px;" >
            <img style="float: right; max-height: 200px;" src="/images/b23e.jpg" >

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn’t working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions