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
Files
Related issues
Updated by Andreas Müller over 2 years 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 about 2 years 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 about 2 years 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 about 2 years 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 about 2 years 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 about 2 years 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 about 2 years 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 about 2 years 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 about 2 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 30
Updated by Andreas Müller about 2 years 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 about 2 years ago
- Target version changed from Release 5.33 to Release 5.49
Updated by Andreas Müller almost 2 years ago
- Related to bug #10181: Search images do not show thumbnails added
Updated by Andreas Müller 7 months ago
- Target version changed from Release 5.49 to Release 5.47
Updated by Katja Luther 3 months ago
- Target version changed from Release 5.47 to Release 5.51
Needs to be moved again.
Updated by Andreas Müller 3 months ago
- Target version changed from Release 5.51 to Release 5.47
Updated by Andreas Müller 3 months ago
- Related to bug #10418: Thumbnail loading takes very long in taxon search added
Updated by Katja Luther about 2 months ago
- Status changed from In Progress to Resolved
- Assignee changed from Katja Luther to Andreas Müller
- Target version changed from Release 5.47 to Release 5.45
This seems to be solved by the adaptions of last release, the image of the taxon page is now the medium representation.
@AM:Please have a look as well.
Updated by Andreas Müller about 2 months ago
- Status changed from Resolved to In Progress
- Assignee changed from Andreas Müller to Katja Luther
- Target version changed from Release 5.45 to Release 5.45a
The thumbnails in the image gallery are still using the large sized images.
Updated by Katja Luther about 2 months ago
Most images in flora greece don't have different representations, so we should create a transformation rule for these images.
Updated by Andreas Müller about 2 months ago
Katja Luther wrote in #note-22:
Most images in flora greece don't have different representations, so we should create a transformation rule for these images.
I don't think this is true. Almost all images should have 3 explicit sizes. Especially if they come from the Padras image server. Do you have examples?
Updated by Katja Luther about 2 months ago
Andreas Müller wrote in #note-23:
Katja Luther wrote in #note-22:
Most images in flora greece don't have different representations, so we should create a transformation rule for these images.
I don't think this is true. Almost all images should have 3 explicit sizes. Especially if they come from the Padras image server. Do you have examples?
For example image2 and image3 of Centaurea macedonica have only the large representation. For Centaurea rechingeri also the images have only 1 representation, they all come from https://fog.upatras.gr/
Updated by Andreas Müller about 2 months ago
Katja Luther wrote in #note-24:
Andreas Müller wrote in #note-23:
Katja Luther wrote in #note-22:
Most images in flora greece don't have different representations, so we should create a transformation rule for these images.
I don't think this is true. Almost all images should have 3 explicit sizes. Especially if they come from the Padras image server. Do you have examples?
For example image2 and image3 of Centaurea macedonica have only the large representation.
OK, this is one of the exceptions that were added manually. But most images were added by imports that handle all 3 representations. E.g. the example from the ticket description: Achillea setacea . These images do have 3 representations but still don't load the correct one for the thumbnails, but only for the profile.
Updated by Katja Luther about 2 months ago
Andreas Müller wrote in #note-25:
Katja Luther wrote in #note-24:
Andreas Müller wrote in #note-23:
Katja Luther wrote in #note-22:
Most images in flora greece don't have different representations, so we should create a transformation rule for these images.
I don't think this is true. Almost all images should have 3 explicit sizes. Especially if they come from the Padras image server. Do you have examples?
For example image2 and image3 of Centaurea macedonica have only the large representation.
OK, this is one of the exceptions that were added manually. But most images were added by imports that handle all 3 representations. E.g. the example from the ticket description: Achillea setacea . These images do have 3 representations but still don't load the correct one for the thumbnails, but only for the profile.
But the search shows thumbnails:
Updated by Andreas Müller about 2 months ago
Katja Luther wrote in #note-26:
But the search shows thumbnails:
Yes, but this ticket is not about the search but about the image gallery. Please check the link in the image description. It does not show thumbnails in the image gallery.
Updated by Katja Luther about 1 month ago
Andreas Müller wrote in #note-27:
Katja Luther wrote in #note-26:
But the search shows thumbnails:
Yes, but this ticket is not about the search but about the image gallery. Please check the link in the image description. It does not show thumbnails in the image gallery.
Sorry, this is fixed with the last commit. We can make a hotfix for this, if necessary.
Updated by Andreas Müller about 1 month ago
KL:
jetzt werden die Thumbnails geladen, man erkennt das nicht, indem man mit der Maus über das Bild geht, sondern indem man Rechtsklick -> Grafik in Tab öffnen macht, da sonst der Link angezeigt wird, für den das Bild steht und das soll ja das große Bild sein.
AM:
ja, jetzt sieht es ok aus.
Wobei mir gerade bei https://portal.cybertaxonomy.org/flora-greece/cdm_dataportal/taxon/e4dfe886-5e66-4bba-94ff-eb603af07f23 aufgefallen ist, dass dort jetzt für das Profilbild das kleine Bild genommen wurde und nicht das mittlere. Aber das ist vielleicht ein leicht anderes Thema. Aber sollten wir uns auch anschauen.
Vielleicht liegt es daran, dass es ein waagerechtes Bild ist?
… bei https://portal.cybertaxonomy.org/flora-greece/cdm_dataportal/taxon/dcfa2fab-03df-42d0-b937-76c045b7f058 ist es auch so, obwohl das kein waagerechtes Bild ist.
Updated by Katja Luther about 1 month ago
- Status changed from In Progress to Resolved
- Assignee changed from Katja Luther to Andreas Müller
This is fixed for the profile image as well, already installed a hotfix branch on production.