Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show original content #6638

Closed
preschian opened this issue Aug 9, 2023 · 13 comments · Fixed by #7018
Closed

Show original content #6638

preschian opened this issue Aug 9, 2023 · 13 comments · Fixed by #7018
Assignees
Labels
$ ~<50usd enhancement New feature or request good first issue as new commer, something you could start with p3 non-core, affecting less than 40%

Comments

@preschian
Copy link
Member

Hi guys, currently, we show optimised images on the gallery detail page. The downside is that gif content will be transformed into a static image. For example, this page https://deploy-preview-6599--koda-canary.netlify.app/stmn/gallery/u-117-382

I'm using https://wsrv.nl/ to resize images on cf-workers. For now, that page still does not support resizing big-resolution gif to smaller-size gif.

Reason

To avoid loading "big" size images to the user. Because it will hurt performance and give them a bad experience on our website. Ref:

For example comparison, 17.8kB vs 2.2MB

screenshot
kodadot image
singular image

Solution

  1. In this PR, I change the URL in the "Details" tab to a public IPFS gateway. So, if the user clicks the "Media" or "Animated Media" link, they will see the original content

image

  1. Second solution, what if we show original content if the user clicks the preview button?

image

wdyt? cc @kodadot/internal-dev

@preschian preschian added the enhancement New feature or request label Aug 9, 2023
@vikiival
Copy link
Member

vikiival commented Aug 9, 2023

Hey,

I am ok with showing static images on landing (as a quick fix), however when user lands the page we should be able to load the dynamic one

@preschian
Copy link
Member Author

preschian commented Aug 9, 2023

however when user lands the page we should be able to load the dynamic one

downside if we use IPFS gateway to show original content

so, it's better to show original content with our r2 bucket. then, need to assign our r2 bucket stockpile to a subdomain, and then we can adjust that to our UI

our public r2 domain
https://pub-50750f0ce9304706bc9d85aa7f920345.r2.dev/ipfs/QmdWuMnTtoA53i23hokJmqSoQBCDRvXrjY4DPTTPppAcEv

@vikiival
Copy link
Member

vikiival commented Aug 9, 2023

o, it's better to show original content with our r2 bucket. then, need to assign our r2 bucket stockpile to a subdomain, and then we can adjust that to our UI

Yup that is the plan from the new design

@preschian
Copy link
Member Author

How to differentiate between loading optimise image and non optimise images? sent additional queries to image-workers? for example ?original=true

@vikiival
Copy link
Member

PR for worker was merged and deployed on beta so its free to grab

@roiLeo
Copy link
Contributor

roiLeo commented Aug 23, 2023

@preschian
Copy link
Member Author

PR for worker was merged and deployed on beta so its free to grab

On it. or is it better to give this to new contributors instead?

@vikiival
Copy link
Member

PR for worker was merged and deployed on beta so its free to grab

On it. or is it better to give this to new contributors instead?

Yup ✅

@vikiival vikiival added $ ~<50usd good first issue as new commer, something you could start with p3 non-core, affecting less than 40% labels Aug 23, 2023
@justskinny5
Copy link
Contributor

👋

@kodabot
Copy link
Collaborator

kodabot commented Aug 28, 2023

ASSIGNED - @justskinny5 🔒 LOCKED -> Wednesday, August 30th 2023, 24:10:26 UTC -> 36 hours

@justskinny5
Copy link
Contributor

@preschian @vikiival hi~ just want to make sure that the final solution is to show original content if the user clicks the preview button, right?

image

@vikiival
Copy link
Member

Hello,

The final solution is decribed in the Solution steps 1 and 2

@justskinny5
Copy link
Contributor

Hello,

The final solution is decribed in the Solution steps 1 and 2

@vikiival Understand, thank you! And the step 1 has already done by PR6599, I am on the step2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$ ~<50usd enhancement New feature or request good first issue as new commer, something you could start with p3 non-core, affecting less than 40%
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants