Skip to content

Commit b939088

Browse files
committed
Set default display behavior for image datatypes to inline preview
Image datatypes now display inline in dataset previews by default, with browser-compatible formats like PNG and JPG showing previews instead of download prompts. Specialized formats like proprietary microscopy and medical imaging files still trigger downloads as appropriate.
1 parent aa1cf40 commit b939088

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/galaxy/datatypes/images.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class Image(data.Data):
6565
edam_data = "data_2968"
6666
edam_format = "format_3547"
6767
file_ext = ""
68+
display_behavior = "inline" # Most image formats can be displayed inline in browsers
6869

6970
MetadataElement(
7071
name="axes",
@@ -419,18 +420,22 @@ def set_peek(self, dataset: DatasetProtocol, **kwd) -> None:
419420

420421
class Hamamatsu(Image):
421422
file_ext = "vms"
423+
display_behavior = "download" # Proprietary microscopy format, not browser-displayable
422424

423425

424426
class Mirax(Image):
425427
file_ext = "mrxs"
428+
display_behavior = "download" # Proprietary microscopy format, not browser-displayable
426429

427430

428431
class Sakura(Image):
429432
file_ext = "svslide"
433+
display_behavior = "download" # Proprietary microscopy format, not browser-displayable
430434

431435

432436
class Nrrd(Image):
433437
file_ext = "nrrd"
438+
display_behavior = "download" # Medical imaging format, not browser-displayable
434439

435440

436441
class Bmp(Image):

0 commit comments

Comments
 (0)