Project

General

Profile

Actions

bug #9979

open

Flora Greece shows large images

Added by Andreas Müller about 1 year ago. Updated 7 months ago.

Status:
In Progress
Priority:
Highest
Assignee:
Category:
cdm-dataportal
Target version:
Start date:
04/25/2022
Due date:
04/29/2022 (about 11 months late)
% Done:

30%

Estimated time:
2:00 h
Severity:
normal
Found in Version:
Tags:

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

Related to EDIT - bug #7093: choosing representation which best fits the available size for taxon profile picture not working in all casesWorksformeAndreas Kohlbecker

Actions
Related to EDIT - bug #10181: Search images do not show thumbnailsNewKatja Luther

Actions
Actions #1

Updated by Andreas Müller about 1 year ago

  • Priority changed from New to Highest
Actions #3

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
Actions #4

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.

Actions #5

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.

Actions #6

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.

Actions #7

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

Actions #8

Updated by Andreas Müller 8 months ago

  • Description updated (diff)
Actions #9

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
Actions #10

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?

Actions #11

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.

Actions #12

Updated by Andreas Müller 8 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 30
Actions #13

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.

Actions #14

Updated by Andreas Müller 7 months ago

  • Target version changed from Release 5.33 to Release 5.37
Actions #15

Updated by Andreas Müller 5 months ago

  • Related to bug #10181: Search images do not show thumbnails added
Actions

Also available in: Atom PDF