Skip to content

fix: Integrate preprocessed images into markdown #4

@Andy34G7

Description

@Andy34G7

Currently, vite.config.mjs runs the image-preprocess.mjs and preprocesses the image. However, these images are not used in rendering of the markdown. Performance is left on the table, and preprocessing currently is just overhead.

Notes of the maintainer
I've tried unsuccessfully to change the image path in the .md during the build process, but I feel like you should be able to first pick the right image, so that might mean passing args to the build script from vite, and maybe serve different images based on width (using css maybe? idk, but this implementation will be bonus :) ). Otherwise, just pick one res, edit the preprocess script accordingly and integrate the preprocess images. :)

I'm pretty sure there's an easier way, but i've been dense so far

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions