oleeskild / obsidian-digital-garden

MIT License
1.41k stars 128 forks source link

Low image resolution on website, but high image resolution in GitHub #355

Closed quinn-p-mchugh closed 9 months ago

quinn-p-mchugh commented 1 year ago

Hi there,

First off, amazing plugin - thanks for your efforts!

Issue Summary

I have an image on this webpage that appears blurry when compared to the source image uploaded to GitHub.

Comparison

Image on Website

image

Image Uploaded to GitHub

image

Steps to Reproduce

  1. Embed png image into note.
    
    ---
    dg-publish: true
    ---

Testing PNG Embedding ![[my-image.png]]


3. Publish note to GitHub repository using plugin.
4. Build website using Vercel.
russellgordon commented 1 year ago

I am certain this is not the recommended solution, but I also ran into this, and was able to work around it by editing the .eleventy.js file.

See image below. At left is the original contents of that file. At right are my modifications. I've essentially told eleventy to leave GIF and PNG files alone – to not optimize them. I prefer do that myself before publishing to GitHub through the Digital Garden plugin in Obsidian.

@oleeskild Would you be willing to add a flag in the Digital Garden settings panel in Obsidian to control whether image optimization happens? Or perhaps to control what image formats will be optimized?

Screenshot 2023-08-15 at 1 27 00 PM

The edited file itself on GitHub:

Screenshot 2023-08-15 at 1 30 00 PM
oleeskild commented 9 months ago

Thanks for providing the community with a temporary workaround @russellgordon 🙌 I've now added this as a feature in the plugin. Under Setting > Digital Garden > Appearance Settings > Theme Settings there is now a new toggle for using full resolution images.

CleanShot 2024-01-18 at 07 52 34@2x