Closed waynedyck closed 3 years ago
I always forget image style images are created when first requested, not when the file is uploaded. You upload a full size image and then apply image styles when viewing them. In the case of the og:image
image, there isn't necessarily a 'view'.
The Imagecache Token module appears to address this issue. The module provides additional tokens for image fields. For each image style available, a token [node:field_image_field:style_name]
will be provided. It is also possible to get image properties like width or height by using tokens like [node:field_image_field:style_name:height]
.
Drupal 8 port The functionality has been merged into the Token module itself, so a separate module will not be needed for D8.
Need to set a default image to use as well as create a separate image field to allow us to upload one of our choice. Also need to create a new image style which crops and resizes the uploaded image automatically to 1200 x 630.
That size is what Facebook recommends for the
og:image
tag.