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

Download remote images and cache them #378

Merged
merged 1 commit into from
Dec 29, 2018

Conversation

vermiculus
Copy link
Contributor

Description

If non-nil, this option will download images from a remote server (if the URL is given with a white-listed protocol; by default only allowing HTTPS) and display them during the execution of markdown-display-inline-images.

Absolute process-specific caching is employed to avoid double-downloading images. No 'nice' means is yet given for the invalidation of this cache.

Related Issue

#316 -- Didn't even know this existed.

This was prompted by magit/forge#41.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have updated the documentation in the README.md file if necessary.
  • I have added an entry to CHANGES.md.
  • [-] I have added tests to cover my changes.
  • All new and existing tests passed (using make test).

Re new tests: unknown how to test this.

@vermiculus
Copy link
Contributor Author

I'll say right now that there should be a good way to invalidate the image cache (or not even have one) but I have a poor track record with implementing expiring caches 'nicely'.

If non-nil, this option will download images from a remote server (if
the URL is given with a white-listed protocol; by default only
allowing HTTPS) and display them during the execution of
`markdown-display-inline-images'.

Absolute process-specific caching is employed to avoid
double-downloading images.  No `nice' means is yet given for the
invalidation of this cache.
@jrblevin
Copy link
Owner

Very nice, thank you!

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