Closed bebraw closed 7 years ago
I'm thinking a plugin could do this. We have postProcess and writeExtras that should be enough, hopefully.
Yeah, writeExtras would be enough. It probably should maintain some metadata so it's smart enough to update only those thumbnails that have changed and create missing ones (just some index somewhere).
Maybe this needs to be accompanied with a React tag that can rely on some convention. This also needs to be parametrized somehow (ie. image max size and so on).
Actually now that I think of it, it would probably make most sense to have the configuration per thumbnail at tag level. That would give most control over the result. Then the problem becomes how to pass that data to writeExtras
.
This is doable on webpack side now in a custom loader quite trivially. No need for a specific Antwar plugin as it's a webpack problem now.
It would be nice if it was possible to generate thumbnails for blog post images. I expect this would be some sort of custom tag.
Given a blog might have a lot of images, I guess this should be an incremental process (generate just missing thumbnail images to the build assets?).