Will likely use ApiLeap and their API to create screenshots on demand. The trigger will be a configuration item likely stored in the Open Graph config file(s) such as oghead-example-test.json.
The behavior of this feature will -
Occur only when genstatic and oghead are both true
Generate a screenshot if a getscreenshot flag is true
Select the image type (jpg or png) using what is found in sshottype
Use the imagewidth and imageheight for image dimensions
Name the file using what is found in sshotname and the desired dimensions. For example if sshotname contains index and the dimensions are 1000 x 800 then the resulting name will be index_1000x800.jpg
Place the URL to the screenshot file in the OG meta tags
Since the "free" plan on ApiLeap is only 100 shots per month there needs to be a "smart" way to insure that a screenshot is actually necessary. Possible methods -
If the screenshot already exists do not get another
Design a method of checking the page or some related indicator that the page is newer than any existing screenshot. If "new" then grab the screenshot.
NOTE : This change may require additional modifications to the OG configuration file(s). This would include -
Flattening of the data structure -
related common fields -
image
imagewidth
imageheight
unrelated common fields (create a new issue for these!)
Will likely use ApiLeap and their API to create screenshots on demand. The trigger will be a configuration item likely stored in the Open Graph config file(s) such as
oghead-example-test.json
.The behavior of this feature will -
genstatic
andoghead
are both truegetscreenshot
flag is truesshottype
imagewidth
andimageheight
for image dimensionssshotname
and the desired dimensions. For example ifsshotname
containsindex
and the dimensions are 1000 x 800 then the resulting name will beindex_1000x800.jpg
NOTE : This change may require additional modifications to the OG configuration file(s). This would include -
image
imagewidth
imageheight
title
,url
, anddescription