Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It's easier to enter paths like public://files/my-image.png in the config. Of course get the real path afterwards.
Comment | File | Size | Author |
---|---|---|---|
#5 | metatag-n1355788-5.patch | 1.39 KB | DamienMcKenna |
Comments
Comment #1
Fleshgrinder CreditAttribution: Fleshgrinder commentedBecause the module wasn't working correctly (no offense and maybe all errors I got were already fixed) I created my own methods within my template.php file and I'm using exactly what you are requesting.
@dev It's very easy to get the real path to the image. As far as I know, it's possible to pass any URI to these functions, the check for public:// themselves.
It would be best if the module directly provides the og_image style (crops + resize to 130 x 130; which is the preferred format by Facebook). Hope I was from any help.
Comment #2
DamienMcKennaComment #3
DamienMcKennaLets make this generic.
Comment #4
DamienMcKennaThis seems like it should work - any image URL values that start with 'public://' are passed through file_create_url().
Comment #5
DamienMcKennaThis one actually works ;)
Comment #6
DamienMcKennaGoing to sneak this into the next release.
Comment #7
DamienMcKennaCommitted.