question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect aspect ratio for thumbnail/preview

See original GitHub issue

Describe the bug Thumbnail/preview has incorrect aspect ratio for one of my images, as shown in screenshot below. The image is also linked below.

Photo/video (optional) that causes the bug See zip: https://www.dropbox.com/s/ee7vw513vl79nuv/testimg.tar.gz?dl=0

Screenshots Left thumbnail has correct aspect ratio. Right one (__a20180218_143832_dc8f44e06e4a.jpg) is incorrect. Both images are attached in link above. image

Environment (please complete the following information):

  • Browser: Firefox 84.0 (64-bit)
  • OS: Ubuntu 20.04.1

Used app version:

  • docker-nightly. See screenshot below for version. image

docker-compose.yml:

version: '3'
services:
  pigallery-db:
    container_name: pigallery-db
    image: mariadb
    volumes:
      - db-data:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=putsomethinginherethatyouwouldlikeasthepassword
      - MYSQL_USER=pigallery2
      - MYSQL_PASSWORD=pigallery2_pass
      - MYSQL_DATABASE=pigallery2

  pigallery2:
    image: bpatrik/pigallery2:nightly-stretch
    command: sh -c 'bin/wait-for pigallery-db:3306 -- --Server-Database-mysql-host=pigallery-db --Server-Database-mysql-username=pigallery2 --Server-Database-mysql-password=pigallery2_pass --Server-Database-mysql-database=pigallery2'
    container_name: pigallery2
    environment:
      - NODE_ENV=production
    volumes:
      - "/mnt/data/tmp/PiGallery2/config:/app/data/config" # CHANGE ME
      - "db-data:/app/data/db"
      - "/mnt/data/tmp/pic_collection:/app/data/images/pic_collection" # CHANGE ME
      - "/mnt/data/tmp/pic_collection2:/app/data/images/pic_collection2" # CHANGE ME
      - "/mnt/data/tmp/PiGallery2/tmp:/app/data/tmp" # CHANGE ME
    ports:
      - 80:80
    restart: always

volumes:
  db-data:

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cbhushancommented, Mar 29, 2021

Thanks for detailed response. The new update seems to work well for sample images. I will update later if all my albums look okay (i moved few things; need to move files back to RPi).

I have no expertise in JS but this lib claims to be “fastest and most versatile JavaScript EXIF reading library’” : https://mutiny.cz/exifr/

1reaction
cbhushancommented, Mar 28, 2021

Results below with new docker image + db reset. Some orientation cases are definitely fixed, while others are not, specially landscape ones. Images from https://github.com/recurser/exif-orientation-examples

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generated media have incorrect aspect ratio
1 Answer 1 ... Under settings >> media, change the height attributes to 9999 , and untick Crop thumbnail to exact dimensions (normally...
Read more >
How do I change the aspect ratio of a video preview thumbnail?
Right click on the file and select "get info" then paste it on the icon in the top left corner where my copied...
Read more >
Incorrect aspect ratio of thumbnails on external drives
When I place pxd files somewhere on internal drive of Mac, thumbnails in the Finder will be displayed in the correct aspect ratio....
Read more >
Aspect Ratio: Everything You Need to Know for 2022
Using the correct aspect ratios ensures your images are displayed as intended without distortion or resolution loss. Let's take a quick look ...
Read more >
Displays images with incorrect aspect ratio
# Use an image CDN · # Check the CSS that affects the image's aspect ratio · # Check the image's width and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found