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

Porting 'Image Resize Filter' #227

Open
BWPanda opened this Issue Jun 20, 2017 · 8 comments

Comments

Projects
None yet
4 participants
@BWPanda
Contributor

BWPanda commented Jun 20, 2017

I have started porting Drupal's Image Resize Filter module to Backdrop.
Port request here: https://www.drupal.org/node/2874704
Repository here: https://github.com/BWPanda/image_resize_filter

@klonos klonos added the Port status label Jun 20, 2017

@klonos

This comment has been minimized.

Member

klonos commented Jun 20, 2017

@BWPanda you should ask permission from the original author 😄

@jenlampton

This comment has been minimized.

Member

jenlampton commented Jun 20, 2017

I thought we included some/most of these features in Backdrop core? Which pieces were missing?

dit: Oh, I bet it was the "create a cached image at the requested size" part... should that be a candidate for core too?

@BWPanda

This comment has been minimized.

Contributor

BWPanda commented Jun 21, 2017

@jenlampton The reason I wanted the Image Resize Filter module for Backdrop is because of this blog article: https://ilovedrupal.com/blog/drupal-tip-2-colorbox-overlay-images-ckeditor

It explains how to use that module and Colorbox (of which there's already a BD module) to automatically create lightbox-enabled images in a WYSIWYG editor.

Images have always been a struggle for me with Drupal/Backdrop; to find a solution that's flexible for clients to add images wherever they want, but to also be easy-to-use and as simple as possible.

That blog post's solution seems to be elegant, simple and ideal for me. Please do let me know if I've missed something and this is already possible with Backdrop, or if/how I should submit a pull request to core to add any missing functionality...

@BWPanda

This comment has been minimized.

Contributor

BWPanda commented Jun 23, 2017

Maybe something like this would be better instead: backdrop/backdrop-issues#1580...

@jenlampton

This comment has been minimized.

Member

jenlampton commented Jun 26, 2017

Yeah, throwing colorbox in the mix makes it a little bit more complicated. I agree that needs to be easier, but I'm not sure colorbox needs to be a core feature.

@BWPanda

This comment has been minimized.

Contributor

BWPanda commented Jun 26, 2017

I'm not sure colorbox needs to be a core feature

No, me either. But the ability to add 'colorbox-load' as a class to links would work I believe, and the ability to add classes to links could certainly be a core feature...

@BWPanda

This comment has been minimized.

Contributor

BWPanda commented Sep 8, 2017

Putting this port on hold in the hopes this feature can get into core instead (see linked issue above).

@quicksketch

This comment has been minimized.

Member

quicksketch commented Sep 8, 2017

I took a look at the port and it looks like it should be fairly straight-forward. It looks like it still has some calls to legacy drupal_* functions, but generally its coming along well!

I think we still have some issues to be resolved, especially how time has changed how we handle images. There are some useful patches on Drupal.org (e.g. https://www.drupal.org/node/2346923) but even then, things have changed a bit, such as using srcset to provide multiple sizes of images and then letting the browser choose the best one. It'd probably be best to start in contrib and work on a core variation afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment