SDWebImage / SDWebImageLinkPlugin

A SDWebImage loader plugin, to support load rich link image with LinkPresentation framework
MIT License
17 stars 2 forks source link

Way to specify custom LPLinkMetadata for when it can't be fetched? #9

Closed inPhilly closed 4 years ago

inPhilly commented 4 years ago

Is there a way, with this framework plugin, to specify custom LPLinkMetadata for when it is unable to be fetched by LPMetadataProvider?

dreampiggy commented 4 years ago

Use the SDWebImageContextLinkMetadata context option, which will use that instead of self-fetched metadata and set to LPLinkView

dreampiggy commented 4 years ago

See: https://github.com/SDWebImage/SDWebImageLinkPlugin/blob/0.2.3/SDWebImageLinkPlugin/Classes/LPLinkView+WebCache.m#L89-L92