Skip to content

Commit

Permalink
fix(share_plus): #3322 Image preview on iOS downscale to avoid issues (
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor-Plaud authored Oct 21, 2024
1 parent 816668a commit d8c95c2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ - (LPLinkMetadata *)activityViewControllerLinkMetadata:
// https://stackoverflow.com/questions/60563773/ios-13-share-sheet-changing-subtitle-item-description
metadata.originalURL = [NSURL fileURLWithPath:description];
if (_mimeType && [_mimeType hasPrefix:@"image/"]) {
UIImage *image = [UIImage imageWithContentsOfFile:_path];
metadata.imageProvider = [[NSItemProvider alloc]
initWithObject:[UIImage imageWithContentsOfFile:_path]];
initWithObject:[self imageWithImage:image
scaledToSize:CGSizeMake(120, 120)]];
}
}

Expand Down

0 comments on commit d8c95c2

Please sign in to comment.