AtlasOfLivingAustralia / ala-bie-hub

BIE (Biodiversity Information Explorer) hub - merge of old ala-bie and bie-plugin
Mozilla Public License 2.0
1 stars 6 forks source link

Prevent displaying duplicate images #50

Closed javier-molina closed 6 months ago

javier-molina commented 1 year ago

Background

Browsing through the species page image gallery, particularly for commonly recorded species with many photos pulled into ALA, there can be numerous duplicate images. This has been an issue for years and appears to be a bug with no clear causation. It is unknown whether this is purely an issue with images pulled in from iNaturalist, or a broader bug that applies to all image providers.

It can be difficult to reliably find these duplicates when visiting an example page, as the order of images appears to change upon session. However, when loading more images, after a short time they become more evident.

They tend to appear as groups of consecutive images duplicated in the gallery, however it may be that individual images are duplicated as well.

Example https://bie.ala.org.au/species/https://biodiversity.org.au/afd/taxa/e6aff6af-ff36-4ad5-95f2-2dfdcca8caff#gallery

Image

This issue needs to be investigated, and a fix delivered to prevent the display of duplicates images across the BIE.

adam-collins commented 1 year ago

pull request https://github.com/AtlasOfLivingAustralia/ala-bie-hub/pull/60

TaniaGLaity commented 11 months ago

@adam-collins there still appear to be duplicate images - see [Osphranter rufus : Red Kangaroo | Atlas of Living Australia (ala.org.au)](https://bie.ala.org.au/species/https:/biodiversity.org.au/afd/taxa/e6aff6af-ff36-4ad5-95f2-2dfdcca8caff)

adam-collins commented 11 months ago
TaniaGLaity commented 11 months ago

is there a way to not show duplicates in the gallery? ie not show inferred occurrence ones? such as your example:

Inferred duplicate occurrence and the occurrence it is an inferred duplicate of having a similar or the same image for each occurrence https://biocache.ala.org.au/occurrences/49130828-b6f2-413a-b6a6-3e2c36f1015b, https://biocache.ala.org.au/occurrences/a5fc8835-fde2-43e9-a1cb-bd269f5cfa32

adam-collins commented 11 months ago

Yes, by changing the filter. Is the qualityProfile=ALA suitable or too aggressive?

TaniaGLaity commented 11 months ago

I think it's fine - seems to be doing it anyway now... (unless you just changed it?)

adam-collins commented 11 months ago

If I understand your statement correctly, that suggested filter will do what you want, in addition to what is done now, and also filter out some additional items as described by the quality profile.

The actual change requires

adam-collins commented 11 months ago

on test, pull request https://github.com/AtlasOfLivingAustralia/ala-bie-hub/pull/106