Skip to content

Fix broken images on egui.rs (move from git lfs to normal git) - #5480

Merged
emilk merged 4 commits into
masterfrom
emilk/fix-images-maybe
Dec 16, 2024
Merged

emilk merged 4 commits into
masterfrom
emilk/fix-images-maybe

Conversation

@emilk

@emilk emilk commented Dec 16, 2024

Copy link
Copy Markdown
Owner

The images in the widget gallery on egui.rs are broken:
image

Not sure why yet, and I fail to reproduce locally.
It's because they are on git lfs.

@emilk emilk added bug Something is broken web Related to running Egui on the web egui labels Dec 16, 2024
@emilk
emilk force-pushed the emilk/fix-images-maybe branch from 1d89c8e to bdfed24 Compare December 16, 2024 08:38
@github-actions

Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/5480-emilkfix-images-maybe
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@lucasmerlin

Copy link
Copy Markdown
Collaborator

Could it be that things aren't checked out with lfs for the web build? The error suggests that image couldn't detect the format which would make sense if the image has the lfs text contents

@InfoInnovator

Copy link
Copy Markdown

I really dont want to intervene here, but @lucasmerlin might be right. I cannot even open the image with my standard image viewer. If i copy the image from the eframe/data to egui_demo_lib/data it works.

@lucasmerlin

Copy link
Copy Markdown
Collaborator

@InfoInnovator if you have this problem locally, make sure you have properly setup git lfs.

@InfoInnovator

Copy link
Copy Markdown

@InfoInnovator if you have this problem locally, make sure you have properly setup git lfs.

My bad. I didnt expect somebody to use lfs for a small PNG and didnt know of the guide. After pulling the lfs files, the web demo works as intended.

@emilk

emilk commented Dec 16, 2024

Copy link
Copy Markdown
Owner Author

Ah, then we should mark the .png:s used for the demo as non-lfs, and also see if we can improve the error message (does lfs links start with some magic bytes?)

@lucasmerlin

Copy link
Copy Markdown
Collaborator

(does lfs links start with some magic bytes?)

I think so:

version https://git-lfs.github.com/spec/v1
oid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393
size 12345

@emilk

emilk commented Dec 16, 2024

Copy link
Copy Markdown
Owner Author

Improvement!

image

@emilk
emilk force-pushed the emilk/fix-images-maybe branch from edf1f11 to 248a30b Compare December 16, 2024 11:42
@emilk

emilk commented Dec 16, 2024

Copy link
Copy Markdown
Owner Author

Fixed! Just need to update CI not to complain
image

@emilk emilk changed the title Try to fix broken images on egui.rs Fix broken images on egui.rs Dec 16, 2024
@emilk emilk changed the title Fix broken images on egui.rs Fix broken images on egui.rs (move from git lfs to normal git) Dec 16, 2024
@emilk
emilk merged commit f0ec2f0 into master Dec 16, 2024
@emilk
emilk deleted the emilk/fix-images-maybe branch December 16, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken egui web Related to running Egui on the web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants