Our-Umbraco-TagHelpers icon indicating copy to clipboard operation
Our-Umbraco-TagHelpers copied to clipboard

<our-img> src attribute will produce urls using the file protocol

Open markadrake opened this issue 8 months ago • 0 comments

I'm using Umbraco 13 (latest version), I have Our.Umbraco.TagHelpers v1.2.0 installed, and my development machine runs macOS.

When I use the <our-img> tag, I notice the resulting url in the source code uses the file protocol.

SRC begins with a slash (doesn't work)

The following code:

<our-img src="/media/iu4aorpa/contessa-32-freya-launch-3.jpg"
           width="340" height="170"
           width--xl="420" height--xl="210"
           width--xxl="480" height--xxl="240" />

Adds the file:// protocol:

<picture>
    <source srcset="file:///media/iu4aorpa/contessa-32-freya-launch-3.jpg?width=480" media="(min-width: 1440px)" width="480" height="240">
    <source srcset="file:///media/iu4aorpa/contessa-32-freya-launch-3.jpg?width=420" media="(min-width: 1280px)" width="420" height="210">
    <img alt="contessa-32-freya-launch-3" width="340" height="170" src="file:///media/iu4aorpa/contessa-32-freya-launch-3.jpg?width=340" loading="lazy" decoding="async" fetchpriority="low">
</picture>

SRC without the beginning slash

<our-img src="media/iu4aorpa/contessa-32-freya-launch-3.jpg"
           width="340" height="170"
           width--xl="420" height--xl="210"
           width--xxl="480" height--xxl="240" />
<picture>
    <source srcset="https://localhost:44381/media/iu4aorpa/contessa-32-freya-launch-3.jpg?width=480" media="(min-width: 1440px)" width="480" height="240">
    <source srcset="https://localhost:44381/media/iu4aorpa/contessa-32-freya-launch-3.jpg?width=420" media="(min-width: 1280px)" width="420" height="210">
    <img alt="contessa-32-freya-launch-3" width="340" height="170" src="https://localhost:44381/media/iu4aorpa/contessa-32-freya-launch-3.jpg?width=340" loading="lazy" decoding="async" fetchpriority="low">
</picture>

markadrake avatar Mar 20 '25 18:03 markadrake