wanze / SeoMaestro

🧙‍♂️A ProcessWire module helping you to manage SEO related tasks like a boss.
MIT License
34 stars 9 forks source link

[Feature Request] Meta Image as Image Field #5

Closed TomS- closed 4 years ago

TomS- commented 5 years ago

It would be good if the image field was rendered as an image field rather than a text field. This would make it easier for clients to change the image presented when sharing pages.

wanze commented 5 years ago

Hi @TomS-

It would be good if the image field was rendered as an image field rather than a text field

Could you explain in more detail what you mean by "rendered as an image field"? Should the Opengraph image be a real image field, allowing a client to upload an image? Or should it just be "rendered" as image field somehow?

Here is the current situation:

  1. The image is a string: The module assumes that this is a direct URL to an existing image
  2. The image is a placeholder, e.g. {image}: The module reuses an existing image from the referenced image field.
esszett commented 5 years ago

Hi Wanze, thank your for that usefull module. I've got two related questions. I think your concept for the image is good, but if I use the placeholder like {image}: a) the module uses the raw max-size version of that image. I would prefer to use a downsized version (1200 x 630) – that's not possible so far? Adding max-width/max-height options for the og:image settings in the seo_maestro defaults would be useful? b) my source-field (image) is configured to fetch a value from a master-page if it's empty. It seems that this setting is ignored when fetching the fieldvalue via placeholder {image}.

wanze commented 5 years ago

Hi @esszett

Thanks for your feedback.

a) the module uses the raw max-size version of that image. I would prefer to use a downsized version (1200 x 630) – that's not possible so far?

Not possible at the moment, but I think this would be a useful addition. Could you open a separate GitHub issue for this? Thanks :)

b) my source-field (image) is configured to fetch a value from a master-page if it's empty. It seems that this setting is ignored when fetching the fieldvalue via placeholder {image}.

I don't understand what you mean, could you give an example?

esszett commented 5 years ago

Hi @wanze,

thank you … 1) I'll open an github issue 2) I have set up an exclusive images field (og_image). In the details tab @seo maestro field it is set as default for the opengraph image {og_image}. The images fieldtype offers an option to fetch a default value (tab details) from a specific page if the field is empty. Since I have a global site settings page, I would like to fetch a default og_image from that settings page (in case the content page og_image-field is emtpy).

When I fetch $page->og_image on a content page, it returns the default image from the settings-page. The seo maestro output in header however contains no image tag. I guess it's in your function getPageImage(), maybe it's related to the getUnformatted() call… that ignores the images-field options?

images-default-value
wanze commented 4 years ago

I currently do not see a way to use an image inputfield to render the Opengraph image. The only solution I can think of would be to use an actual image field for this, and I'd rather avoid creating fields in behalf of the module. Therefore, I am closing this issue. Please reopen if you have an idea how to implement this (without creating any fields). :)