Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the default rendition of image? #137

Open
yuhr123 opened this issue Jan 23, 2024 · 4 comments
Open

How to change the default rendition of image? #137

yuhr123 opened this issue Jan 23, 2024 · 4 comments

Comments

@yuhr123
Copy link

yuhr123 commented Jan 23, 2024

I know that the default width for images is width-500, but this is too small for general use.

Anyone could tell me how to change the width to width-1000?

@zerolab
Copy link
Member

zerolab commented Jan 24, 2024

@yuhr123
Copy link
Author

yuhr123 commented Jan 24, 2024

Please see https://github.com/torchbox/wagtail-markdown#inline-links

Hi @zerolab, thank you for your information. Yes, I am aware that I can use ![](image:123, filter=witdh-xxx) to specify a specific rendition for an image. However, I would like to change the default value for all images inserted into the markdown block. Do you have any suggestions?

@zerolab
Copy link
Member

zerolab commented Jan 25, 2024

At the moment, there is no way to override that -

rendition = self._get_rendition(image, opts.get("filter", "width-500"))

I'd be happy to review a PR that adds another configuration option (default_image_filter or something along those lines) and uses that in

rendition = self._get_rendition(image, opts.get("filter", "width-500"))

@yuhr123
Copy link
Author

yuhr123 commented Jan 25, 2024

I'd be happy to review a PR that adds another configuration option (default_image_filter or something along those lines) and uses that in

👍 Looks good, I am looking forward it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants