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

add reddit post image #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Nitero
Copy link

@Nitero Nitero commented Oct 18, 2024

No description provided.

@esodesod
Copy link
Collaborator

Hi! Thank you for the PR. I actually played around with the (preview) image today myself (not pushed the update yet), but I put the image into the body, e.g. under the post text, combined with the image filter, which renders nicely, e.g. something like {{selector:#post-image?src|image}}.

I'm planning on updating that (basically the same as here, just in the body + embedded image), but curious; what is the reason for putting the link it in the properties directly, rather than the body?

PS: While doing some initial testing earlier today, I also found that the "zoomable-img" is better quality (which I personally prefer to use, is possible, though it both pros & cons). I might aim to extract the zoomable-img part, instead. Also (just FYI) images seems to sometimes be in a "gallery-carousel", e.g. multiple images within #shreddit-media-lightbox. Have not tried to extract these yet, but just as an FYI, if you want to give it a go :-).

@esodesod
Copy link
Collaborator

Quick update: For the the post image in note body (under post title), I'll add {{selector:zoomable-img > img?src|image}}. It both seems to be a better quality image, and does not contain the additional url parameters

e.g. from https://www.reddit.com/r/ObsidianMD/comments/1g5yxxw/help_is_there_anyway_to_emulate_this_setup_on/

{{selector:#post-image?src|image}} results in https://preview.redd.it/help-is-there-anyway-to-emulate-this-setup-on-obisidian-v0-037da14l9dvd1.png?width=640&crop=smart&auto=webp&s=e14fd17984e7419345268d79c537c376dadcbe2b, which is lower quality, e.g.

But {{selector:zoomable-img > img?src|image}} results in https://i.redd.it/037da14l9dvd1.png, which is higher quality, e.g.:

@Nitero
Copy link
Author

Nitero commented Oct 18, 2024

what is the reason for putting the link it in the properties directly, rather than the body?

so that I can show it in a dataview query

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

Successfully merging this pull request may close these issues.

2 participants