Can I resize and crop image in text with (image: …) tag?


Can I resize and crop image in text with (image: …) tag in my markdown text?

Something like this?

(image: business-man-1031755_1280.jpg width: 500 height: 300 crop: true)

Or I need to make my own tag (extend image tag)?

Thank you.

According to the docs, width and height are options but it just sets the width & height html attributes, i believe, it does not physically resize the file, and crop is not an option.

So yes, I think you would have to make your own tag.

1 Like

You can definitely make a tag from the built in stuff, but it would be much easier to make tag around the Focus Crop plugin. This way you just need feed parameters through. The bonus is that you can set a focal point on the image - the built in crop works around the images center point, so you can end up cutting peoples heads off, depending on whats in the image :slight_smile:

1 Like

Code is dirty as f***, but it works.