Closed johndwells closed 3 months ago
Vizy is certainly supposed to mimic that functionality, because I agree - images/assets need to be a reference as they can be moved.
I assume we're talking about an Image node:
if you inspect the source of the node using the HTML button, can you confirm what you see? For a quick test on my end, I'd get the URL that you'd expect:
<figure class="vui-editor-img-wrap" tabindex="-1"><img src="http://vizy.test/uploads/examples/wide/beth-smith-pltSxmU1Vg0-unsplash.jpg#asset:694:transform:wide" title="Beth smith plt Sxm U1 Vg0 unsplash" alt="Beth smith plt Sxm U1 Vg0 unsplash"></figure>
OK good to know that Vizy is supposed to do this!
Here's what I see when I inspect the source of the node using the HTML button:
<figure class="vui-editor-img-wrap" tabindex="-1"><img src="https://crooked-antechinus.transforms.svdcdn.com/production/images/photocredits_chiara_becattini_4.800x0_9ed0fd83c0e67da5bb1852cd50586505.jpg?w=1024&h=683&auto=compress%2Cformat&fit=crop&dm=1707131570&s=3b7cec13ce6cf55e4bd56f026784b6c7" title="Chiara Becattini " alt="Chiara Becattini "></figure>
It's worth pointing out that this is a project running on Servd, so it "overrides" the asset URL to be sure that it's served via its image CDN. In this case I don't even think there's a transform rule that's been set on the image, but the CDN url still includes some formatting parameters.
So is it possible that the Servd plugin is overwriting the appending of #asset:694:transform:wide
? If that's the case I can ping them on this issue.
Hmm so I've just tested again, running locally, disabled the Servd plugin, using a local assets volume, and I'm still not seeing that hash value appended to the image URL:
<figure class="vui-editor-img-wrap" tabindex="-1"><img src="https://jahl.ddev.site/volumes/images/JOHN-TEST/JOHN_TEST.jpg" title="JOHN TEST" alt="JOHN TEST"></figure>
My journey is straightforward: place cursor inside Vizy field; click Image button; select asset; click insert.
That's interesting, I was thinking it might have been Servd related, but thanks for testing locally as well.
But I believe I see the issue. When you don't pick a transform, it will just be the raw URL.
Fixed for the next release. To get this early, run composer require verbb/vizy:"dev-craft-4 as 2.1.19"
.
Fixed in 2.1.20
Describe the bug
Our experience is coming from Redactor, for context.
We have a client that has embedded images into a Vizy field, and saved their work. Later, any number of things might occur:
In any of these cases when using Redactor, the image's URLs are always "correct", i.e. the
<img>
tag'ssrc=
value has been updated to the image's current location, environment URL structure, etc.In the CMS if we view the HTML source for the field, the src= value looks like this:
It's that
#asset:85061:url
value at the end that Redactor picks up and then makes sure whenever it's saving the entry, or outputting on the front-end, that the image URL is correct.But we are finding that with Vizy, this is not the case.
Steps to reproduce
Expected result: image should render
Actual result: image is broken
Craft CMS version
4.9.2
Plugin version
2.1.19
Multi-site?
No response
Additional context
No response