connectapi
connectapi copied to clipboard
simplify `set_image_*()` functions
There are three functions to update content images:
-
set_image_path(content, path)
uploads a local image file to Connect for use as a content image; -
set_image_url(content, url)
downloads an image from a URL and callsset_image_path()
; -
set_image_webshot(content, ...)
useswebshot2
to take a screenshot of the content, and callsset_image_path()
with that resulting image.
The first function should just become set_content_image(content, path)
or something similar. The other two should become recipes in the cookbook.
The tests for set_image_webshot()
are very flaky, so they have been disabled in CI.