Closed adam-zethraeus closed 10 years ago
I'm going to start work on this today or tomorrow since it seems to be a blocker for merging anything new into ghost.
Sorry, I've been flat out. I'll have a think about the best way to tackle this tonight — let me know if you get started on it, so we don't end up double-handling. :)
Bump :) Would looove for this to be resolved even if it's just a temporary workaround with the condition that I remove it when Ghost no longer needs it :wink:
i'll take another look shortly.
next on my plate if the cleanup (https://github.com/cgiffard/Downsize/pull/16) goes in! :)
It looks like the two cases this would have to deal with are markdown output matching:
<p><img src="..." ...></p>
and
<p><a href="#"><img src=".."></a></p>
It currently works for video as well I believe.
oh good point, thanks!
I want to extend the parser to support tag types rather than regex it. If we merge this we should have a followup to do it properly. :)
I think you can close this issue now. I have a plan to reproduce this feature inside Ghost, so that we can upgrade to a newer version of downsize. I don't think it's really the job of downsize to maintain what was a bug.
Also, by having it internally in Ghost, we can properly manage deprecating it once we have equivalent functionality done in the right way.
What do you think would be a good API to preserve an initial image in the HTML?
downsize("", {words:0, keepInitialImage:true});