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

Backend: Better method for determining image thumbnail (instead of just using the first <img> url) #1241

Open
Splike opened this issue Sep 10, 2019 · 2 comments

Comments

@Splike
Copy link

Splike commented Sep 10, 2019

Feed used: https://anto-finnstark.artstation.com/rss

image

@samuelclay
Copy link
Owner

This one's always hard. I wonder if the emoji is coming from the Text view or the Feed view.

The way it works now is that it uses the Feed view's first image unless there's a Text view, in which case it uses that view's first image. I believe it also checks for the largest image, but my memory seems to think it is only the Text view.

So for this feed it looks like you're looking at the first image, and the Text view doesn't load. That's why and the fix it to have every image get its size looked up, but that would be a huuuuge amount of work on the backend.

And I'm not sure it can be done easily on the front-end because that would require loading every image even when you're looking at one of the single story views (List view, Grid view, single story mode).

It's just too hard to do 100% right. I wish I knew of a better way to figure out the right image url yo preview.

@samuelclay samuelclay changed the title [Bug] Emoji wins in grid view Backend: Better method for determining image thumbnail (instead of just using the first <img> url) Sep 13, 2019
@Splike
Copy link
Author

Splike commented Sep 14, 2019

I took a look at the feed, and smileys look like this

<img class="emoji" alt="smiley" src="https://cdn.artstation.com/mailer/emoji/smiley.png" />

If the first image read has class=emoji, then skip that image and try to read the next one.

Another possibility might be to read the file name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants