backdrop-contrib / seo_meta

SEO Meta Tags module for Backdrop CMS
GNU General Public License v2.0
4 stars 1 forks source link

Open Graph image upload #18

Open ghost opened 6 years ago

ghost commented 6 years ago

I've found that the image I want to use for the Open Graph meta tag is one I've already uploaded to the node, so I have to upload the same image twice (once for the node content, and one for the meta tag).

I'd like to therefore request the ability to either upload a new image, or link to an existing image. The easiest way to do this would be to allow pasting in a URL to an image (I could then copy & paste it from the node).

findlabnet commented 6 years ago

Thank you, TBD.

indigoxela commented 2 years ago

@findlabnet I'd also love to see this feature in SEO Meta Tags, but actually I belief, there's a way easier approach: enable the image browser in every "managed_file" form item.

Three of these managed_file items exist. Adding '#browser_view' => 'image_library', does the trick. So the addition of tree lines of code would solve the problem.

Wonder, why this hasn't been considered yet. Any technical concerns?

I could provide a PR, if that's OK for you.

findlabnet commented 2 years ago

...if that's OK for you.

With pleasure. Just not enough free time and not too many requests for it.

indigoxela commented 2 years ago

Well, did I say "a three-liner"? Nope... :grinning:

Here's a PR that partly provides what I described, but... for the life of mine, I can't get this working with the multi-step forms (for front page, views and tags). The previous value simply isn't available anymore in the step, but we'd need these for proper file usage handling. Even in the database it's already gone when we reach the "validate" function. #23

The PR does work with the default settings form and with node forms, though.

Another finding: as the file usage is handled currently, the usage is always increased (even when just saving the form), but never decreased. (That explains why there are so many file usages for my user on a life site - caused me some head scratching.)

I wonder, if someone comes up with a smart idea for the multi-step forms.