bug #9979
openFlora Greece shows large images
30%
Description
though medium and small exist and seem to have correct metadata.
E.g. Achillea setacea https://portal.cybertaxonomy.org/flora-greece/cdm_dataportal/taxon/8e75f1a8-e7f9-4e3e-9ccd-98216a59e7cd
Related issues
Updated by Andreas Müller 12 months ago
- Due date changed from 03/31/2022 to 04/29/2022
- Target version changed from Release 5.31 to Release 5.32
- Start date changed from 03/28/2022 to 04/25/2022
Updated by Andreas Müller 9 months ago
- Assignee changed from Andreas Müller to Katja Luther
As you currently work in this area I give this ticket to you for now.
Updated by Katja Luther 9 months ago
This problem appears if the limit for the thumbnail size is smaller as the size of the smallest representation. Then the representation of the full_size_representation is used.
This should be changed, so that nothing is returned otherwise the limit does not make sense.
Updated by Andreas Müller 9 months ago
Katja Luther wrote in #note-5:
This problem appears if the limit for the thumbnail size is smaller as the size of the smallest representation. Then the representation of the full_size_representation is used.
This should be changed, so that nothing is returned otherwise the limit does not make sense.
Please add link to code so it can be fixed easily.
Also we should have a look if there is not similar code in cdmlib that can be used instead.
Updated by Katja Luther 9 months ago
Andreas Müller wrote in #note-6:
Katja Luther wrote in #note-5:
This problem appears if the limit for the thumbnail size is smaller as the size of the smallest representation. Then the representation of the full_size_representation is used.
This should be changed, so that nothing is returned otherwise the limit does not make sense.
Please add link to code so it can be fixed easily.
Also we should have a look if there is not similar code in cdmlib that can be used instead.
The representations are selected in GalleryItemMedia.php findRepresentations($media)
In cdmlib there are some Methods in MediaUtils
Updated by Andreas Müller 8 months ago
- Related to bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all cases added
Updated by Andreas Müller 8 months ago
The service which is called by the portal page https://api.cybertaxonomy.org/flora-greece/portal/taxon/8e75f1a8-e7f9-4e3e-9ccd-98216a59e7cd/media.json?type=ImageFile&relationships=&relationshipsInvers=&includeTaxonDescriptions=1&includeOccurrences=&includeTaxonNameDescriptions= returns only 2 small and 1 medium representation. This is strange. Where do the large representations come from?
Are they loaded by the singular media calls like https://api.cybertaxonomy.org/flora-greece/portal/media/5c8d41c9-a242-4a5d-b806-07dc322bbf4c.json ?
So the first result is not taken for filtering the representations?
Updated by Andreas Müller 8 months ago
The method findRepresentations($media) uses strict=true for thumbnail retrieval. This is dangerous, because in this case no thumbnail is returned if the size restriction is not fullfilled. Therefore only the full size representation is available.
I set strict=false . Let's see what happens.
Updated by Andreas Müller 8 months ago
- Status changed from New to In Progress
- % Done changed from 0 to 30
Updated by Andreas Müller 8 months ago
- Target version changed from Release 5.32 to Release 5.33
Andreas Müller wrote in #note-11:
The method findRepresentations($media) uses strict=true for thumbnail retrieval. This is dangerous, because in this case no thumbnail is returned if the size restriction is not fullfilled. Therefore only the full size representation is available.
I set strict=false . Let's see what happens.
Unfortunately, the changes did not improve the situation. Still the large images are loaded.
Updated by Andreas Müller 7 months ago
- Target version changed from Release 5.33 to Release 5.37
Updated by Andreas Müller 5 months ago
- Related to bug #10181: Search images do not show thumbnails added