Pro 6 Beta 2 - Params on an image

Not sure if I am missing something here.

I’ve created a component which has an image. I’ve set a param which I want to use as the source for the image.

{
“specialistIMG” : {
“label” : “Image”,
“type” : “image”,
“initial” : “”,
“height” : 2
}
}

How do I get {{dc:p:specialistIMG}} into the source of the image?

image

If I click the + then I can only either upload an image or select one from the media library.
If I click the “Dynamic Content” icon then there is no option to add an element parameter.

On the alt text, as an example, at the end of the dynamic content there is an option to add “Element Parameters.”

image

Hey thanks for bringing this to our attention. We will add the ability to put your own custom Dynamic Content on an image element.

Thanks for chiming in, @charlie. This one is a bit of an edge case to look into, but there are ways to get a Parameter value into an Image control’s input, @urchindesign. You can use either of the following methods:

  1. Click on the + in the image control and when the WordPress Media Manager pops up, click on Insert from URL in the upper-left corner of the modal. When on that tab, remove the http:// / https:// typically found in the input and place your Dynamic Content string here.
  2. Go to Dev Toolkit and find the key you are wanting to place your Dynamic Content into and wire it up.

Personally, I use the first one all the time as it is a direct access point without having to go into Dev Toolkit. There are some nuances to this control, which is why it doesn’t have a “breakout mode” version at this time, but it is still readily accessible using the methods described above.

Thanks!

Thanks for that. I did try the break out mode so that explains why that didn’t help.

Option 1 sounds good.

I think however this brings us back to something we’ve been asking about in the beta forums for a while now. That is the ability to see what the source is on an image. Currently once you have added an image you have no idea what its source is. (It is sometimes useful as during development I will often have multiple versions of the same image. So if i want to see what I’m using it can’t be done in the builder.)

1 Like

@urchindesign, noted. Not sure if it’s something we’ll get to in this cycle. If you absolutely have to compare the source string, you can take a look at it in the Dev Toolkit as everything is accessible / stored there. For most users, once the image is applied they aren’t needing to compare different types, but I can see how it’d be helpful potentially. Thanks!

3 Likes

Thanks. I should definitely use the Dev Toolkit more :smiley:

1 Like

Option 1 works perfectly. Thanks for that one.

1 Like

No problem!

@kory - can you maybe show us how to access this in the dev toolkit. @misho and I have both gone through it and can’t find a reference to the URL / source string of the image.

I see an image_src but it is just the media library id with the image size so not very helpful.

image

1 Like

@urchindesign, that is how images get stored when using the image control to ensure that we’re referencing an ID if that path changes down the road. Sorry, I wasn’t thinking about that when I referenced it earlier. If you’re trying to look for the actual URL, you would need to use the methods you mentioned in other threads. You could use this value though to copy and past amongst Elements as you see fit though, and it would ensure the path always resolves.

1 Like