diff --git a/app/activitypub/util.py b/app/activitypub/util.py index fa9c3eed..cdb96957 100644 --- a/app/activitypub/util.py +++ b/app/activitypub/util.py @@ -912,7 +912,7 @@ def post_json_to_model(activity_log, post_json, user, community) -> Post: db.session.commit() if post.image_id: - make_image_sizes(post.image_id, 150, 512, 'posts') # the 512 sized image is for masonry view + make_image_sizes(post.image_id, 170, 512, 'posts') # the 512 sized image is for masonry view return post except KeyError as e: @@ -1782,7 +1782,7 @@ def create_post(activity_log: ActivityPubLog, community: Community, request_json db.session.commit() if post.image_id: - make_image_sizes(post.image_id, 150, 512, 'posts') # the 512 sized image is for masonry view + make_image_sizes(post.image_id, 170, 512, 'posts') # the 512 sized image is for masonry view # Update list of cross posts if post.url: @@ -2002,7 +2002,7 @@ def update_post_from_activity(post: Post, request_json: dict): db.session.commit() if post.image_id and post.image_id != old_image_id: - make_image_sizes(post.image_id, 150, 512, 'posts') # the 512 sized image is for masonry view + make_image_sizes(post.image_id, 170, 512, 'posts') # the 512 sized image is for masonry view if 'sensitive' in request_json['object']: post.nsfw = request_json['object']['sensitive'] if nsfl_in_title: diff --git a/app/community/routes.py b/app/community/routes.py index 750347a3..3df94799 100644 --- a/app/community/routes.py +++ b/app/community/routes.py @@ -604,7 +604,7 @@ def add_image_post(actor): post.ap_id = f"https://{current_app.config['SERVER_NAME']}/post/{post.id}" db.session.commit() if post.image_id and post.image.file_path is None: - make_image_sizes(post.image_id, 150, 512, 'posts') # the 512 sized image is for masonry view + make_image_sizes(post.image_id, 170, 512, 'posts') # the 512 sized image is for masonry view # Update list of cross posts if post.url: @@ -684,7 +684,7 @@ def add_link_post(actor): post.ap_id = f"https://{current_app.config['SERVER_NAME']}/post/{post.id}" db.session.commit() if post.image_id and post.image.file_path is None: - make_image_sizes(post.image_id, 150, 512, 'posts') # the 512 sized image is for masonry view + make_image_sizes(post.image_id, 170, 512, 'posts') # the 512 sized image is for masonry view # Update list of cross posts if post.url: @@ -764,7 +764,7 @@ def add_video_post(actor): post.ap_id = f"https://{current_app.config['SERVER_NAME']}/post/{post.id}" db.session.commit() if post.image_id and post.image.file_path is None: - make_image_sizes(post.image_id, 150, 512, 'posts') # the 512 sized image is for masonry view + make_image_sizes(post.image_id, 170, 512, 'posts') # the 512 sized image is for masonry view # Update list of cross posts if post.url: diff --git a/app/community/util.py b/app/community/util.py index 517c390f..cec1fe5e 100644 --- a/app/community/util.py +++ b/app/community/util.py @@ -345,7 +345,7 @@ def save_post(form, post: Post, type: str): img_width = img.width img_height = img.height # save a second, smaller, version as a thumbnail - img.thumbnail((150, 150)) + img.thumbnail((170, 170)) img.save(final_place_thumbnail, format="WebP", quality=93) thumbnail_width = img.width thumbnail_height = img.height diff --git a/app/static/structure.css b/app/static/structure.css index 19f31a4a..667a2004 100644 --- a/app/static/structure.css +++ b/app/static/structure.css @@ -739,7 +739,7 @@ fieldset legend { @media (min-width: 992px) { .post_list .post_teaser .thumbnail img { height: 90px; - width: 171px; + width: 170px; } } .post_list .post_teaser .thumbnail img.blur { diff --git a/app/static/structure.scss b/app/static/structure.scss index 21a8d32f..720f2bd8 100644 --- a/app/static/structure.scss +++ b/app/static/structure.scss @@ -332,7 +332,7 @@ html { margin-left: 5px; @include breakpoint(tablet) { height: 90px; - width: 171px; + width: 170px; } &.blur { filter: blur(3px); diff --git a/app/utils.py b/app/utils.py index 02e1d217..0515ad64 100644 --- a/app/utils.py +++ b/app/utils.py @@ -902,7 +902,7 @@ def url_to_thumbnail_file(filename) -> File: Image.MAX_IMAGE_PIXELS = 89478485 with Image.open(final_place) as img: img = ImageOps.exif_transpose(img) - img.thumbnail((150, 150)) + img.thumbnail((170, 170)) img.save(final_place) thumbnail_width = img.width thumbnail_height = img.height