일부 리사이즈된 이미지에서 라이트박스가 표시되지 않음

A user uploaded two similar images, one 1172x103 and the other 1180x82 pixels. I have my thumbnailing sizes set to 350x200 so these were both too big and resized to 350x30 and 350x24 pixels respectively. When the post is viewed the first image is lightboxed but the second isn’t.

I suspect this may be related to a bug that was fixed towards the end of last year…

It makes a statement that I think has been coded in…

  • It should probably need to exceed both dimensions, as opposed to just one – I can’t quite picture a use case where you would want an image that’s, say, 690×10 pixels (on the page) to be lightboxed.

I think the bug made lightboxing mandatory for any image bigger than 100x100, so I suspect the second image doesn’t get a lightbox because it’s intial height was less than 100 pixels. However, the resized image is now too small at 350x24 pixels for the text on it to be read and there’s no lightbox to allow the original image to be viewed.

2개의 좋아요

최근 라이트박스 변경 이후에도 여전히 문제가 발생하고 있습니다. 이미지가 더 작게 리사이즈된 후 라이트박스가 적용되지 않는 경우가 여전히 있습니다. 리사이즈되는 모든 이미지에 라이트박스가 적용되도록 수정할 가능성이 있을까요?

여기서 문제를 시연해 주시겠습니까?

시도해 보았지만 여기서는 재현할 수 없습니다. meta가 max_image_width(690)와 max_image_height(500)의 기본값을 사용하고 있다고 의심합니다. 제 최대 너비는 350, 최대 높이는 200으로 설정되어 있습니다.

이로 인해 또 다른 문제가 드러났습니다. 테스트로 크기를 기본값인 690과 500으로 되돌려 보았더니, 설정값에는 690x500으로 표시되지만 이미지를 업로드하면 여전히 이전의 최대 크기인 350x200으로 리사이즈됩니다. Discourse를 재시작해 보았지만 기본값이 적용되지 않았습니다.

새로 업로드된 이미지인가요, 아니면 기존 이미지인가요?

같은 파일의 새 업로드입니다. 이것이 차이를 만드는지 확실하지 않습니다. 새 업로드 이름이 부여되지만, 업로드되는 파일의 체크섬을 사용한某种의 중복 제거가 이루어진다면, 실제 파일 사본은 하나일 수도 있습니다.