Open iamthomasbishop opened 4 years ago
As far as I checked, it would be enough just by passing the caption value that is already being fetched when selecting the image to Gutenberg.
In this case we could just add the caption field when creating the MediaInfo
object in WordPress/Classes/ViewRelated/Gutenberg/Utils/GutenbergStockPhotos.swift.
Here it's going to be a bit tricky because it implies to modify the Stock Media store in FluxC.
As far as I checked, the payload from the response contains a field with extra information (including the caption) about the photo in JSON format. My plan would be:
mGuid
field from the payload.StockMediaItem
object.
On Calypso, if you add an image from Free Photo Library (aka Pexels), a caption is added, giving deserved photo credit/attribution.
On calypso:
Note: I thought we had this on Aztec at one point, but I’m not seeing that happen when adding from FPL.