Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default image size for lazy loaded images (#233)
* Add default image size for lazy loaded images * Rewrite code to set image dimensions Here were the problems, and here’s the solution: 1. I had to mount the static folder to assets/ as suggested by @bep to be able to get all images as resources 2. You have to be careful about some types, like for example if you call safeURL on a path the returned object isn’t a string, so you can’t pass it to .Page.Resources.GetMatch 3. I had to use the .Page object to get resources. 4. Trying to evaluate width and height on an SVG resource fails. We use some SVGs in Markdown, as we sometimes use the format for lightweight game sprites and other graphic design.
- Loading branch information