diff --git a/instagram_private_api/endpoints/upload.py b/instagram_private_api/endpoints/upload.py index c173a45a..5bf63350 100644 --- a/instagram_private_api/endpoints/upload.py +++ b/instagram_private_api/endpoints/upload.py @@ -738,8 +738,7 @@ def post_album(self, medias, caption='', location=None, **kwargs): raise ValueError('Duration not specified.') if not media.get('thumbnail'): raise ValueError('Thumbnail not specified.') - aspect_ratio = (media['size'][0] * 1.0) / (media['size'][1] * 1.0) - if aspect_ratio > 1.0 or aspect_ratio < 1.0: + if not self.compatible_aspect_ratio(media['size']): raise ValueError('Invalid media aspect ratio.') if media['type'] == 'video':