I'm using a custom Image component to wrap the assets image component.
So if you do go down the remark plugin, you could do something similar to this:
I'm not sure if this is the most optimal way of doing it but it works for me
What it does is replaces the default Image import that got added in https://github.com/withastro/astro/pull/6824 and then points to my custom component that then handles it
Then in markdown you just use the image like you normally would 
const isNodeAstroImage = (node: MdxjsEsm): boolean => {
const estreeBody = node.data?.estree?.body[0] as ImportDeclaration;
if (estreeBody === undefined) return false;
if (estreeBody.source?.type !== 'Literal' || estreeBody.source?.type === 'astro:assets') return false;
return estreeBody.specifiers[0]?.local?.name === '__AstroImage__';
};
const replaceAstroImage = (): Transformer => (tree) => {
const importsStatements: MdxjsEsm[] = [];
visit(tree, 'mdxjsEsm', (node: MdxjsEsm) => {
if (isNodeAstroImage(node)) importsStatements.push(node);
});
importsStatements.forEach((n) => {
const index = (tree.children as Array<Node>).indexOf(n);
(tree.children as Array<Node>).splice(index, 1);
});
(tree.children as Array<Node>).unshift(jsToTreeNode(`import { default as __AstroImage__ } from '~components/Image.astro';`));
};
export default replaceAstroImage;
Full gist https://gist.github.com/roryclaasen/f69b1a37481429a16789a51dc65a1248 due to discord message length