oc-imageresizer-plugin icon indicating copy to clipboard operation
oc-imageresizer-plugin copied to clipboard

oc-imageresizer-plugin is being migrated to core - https://github.com/octobercms/october/pull/5231

Open lthurston opened this issue 5 years ago • 28 comments

Hi all, It sounds like @toughdeveloper is no longer able to invest the time necessary to maintain this project (see https://github.com/toughdeveloper/oc-imageresizer-plugin/pull/53). I'm quite grateful to him for this plugin as my team uses it on most October projects, and see the need for it to live on beyond his maintenance of it.

I'm hoping someone who sees this message would be willing to take on the task of maintaining this plugin for us and for posterity. Unless, of course, there's some other plugin out there that does this better.

I would be willing to do so but I'm afraid I might quickly fall into the same situation that Matthew has, and might not be able to put the time into it that's required. However, I'd be happy to collaborate with a few other maintainers to keep this thing going.

Let's discuss!

Please note that so far I've only referred people to this message who have open PRs on the project. If we need to bring a larger group in, or have the conversation elsewhere (Slack), that's fine by me. I just want to get the ball rolling.

Lucas

lthurston avatar Mar 27 '19 18:03 lthurston

I agree with greetings to @toughdeveloper who did a great job and we also use the plugin in several projects, so we're are interested in actively maintain it.

I suggest as first step to fork the repo - or better, ask to @toughdeveloper if him is open to transfer the ownership or add collaborators to mantain a full project history - to manage existing PR and carry on the code to an up-to-date status.

Finally, I think that we should agree on a 3 to 5 member team to avoid a "single point of failure" on project management.

matteotrubini avatar Mar 28 '19 11:03 matteotrubini

Will be great to see it being maintained again! Happy to add collaborators to the project. Although to avoid the risk of malicious contributions, I would like to remain responsible for the project in October CMS (https://octobercms.com/plugin/toughdeveloper-imageresizer)

@matteotrubini @lthurston - Sound ok?

matt-pawley avatar Mar 28 '19 11:03 matt-pawley

That sounds perfect Matthew. Thank you for your response and your extensive work on this plugin!

chocolata avatar Mar 28 '19 12:03 chocolata

No worries, invites sent to suggested maintainers.

Just tag me when updates are merged to master. Don't forget to update version.yaml or October store will not update.

matt-pawley avatar Mar 28 '19 12:03 matt-pawley

Is there interest in having this brought into core?

LukeTowers avatar Mar 28 '19 14:03 LukeTowers

As far as I'm concerned, definitely! I don't start any project without this plugin.

chocolata avatar Mar 28 '19 14:03 chocolata

Agreed, this is crucial for resizing images from Twig. I'd like to get some of these PRs addressed before we start merging it into the core though.

lthurston avatar Mar 28 '19 15:03 lthurston

It's a must-have, like https://github.com/alserom/octobercms_clearcachewidget

matteotrubini avatar Mar 28 '19 15:03 matteotrubini

Including in core would be ideal IMO.

matt-pawley avatar Mar 28 '19 15:03 matt-pawley

Can I have a point form list of each individual feature that this plugin adds to plan how to best integrate it with the core?

LukeTowers avatar Mar 28 '19 15:03 LukeTowers

Summarizing README.md:

  • Adds twig filter for generating thumbs based on path to image (including resize, crop, quality, and file format)
  • Integrates with tinypng for image compression (I haven't used this, can't vouch for it)
  • Add simple PHP function for resizing images (including resize, crop, etc)
  • Adds thumb generation to backend list configuration (I haven't used this, can't vouch for it)

lthurston avatar Mar 28 '19 16:03 lthurston

@LukeTowers do you have some plans in the short term to integrate the functions or currently it is only in wishlist?

In the meanwhile, I suggest to use reviewers in existing PR to approve them in team - ex: any PR should be approved by the majority of the collaborators to be merged.

matteotrubini avatar Apr 11 '19 09:04 matteotrubini

@matteotrubini I currently don't have any time to do it myself, but if someone put together a PR I would be more than happy to review it.

LukeTowers avatar Apr 11 '19 16:04 LukeTowers

@toughdeveloper I just added a "develop" branch to merge PRs and better manage releases. Do you agree?

matteotrubini avatar Apr 15 '19 10:04 matteotrubini

@matteotrubini - Sounds good, but avoid any confusion can you clarify the suggested process further please? Are you looking to have release branches which would branch from develop and be merged into master?

matt-pawley avatar May 04 '19 07:05 matt-pawley

I think Gitflow would be fine: we can manage any merge into master as a PR that need to be approved by reviewers.

matteotrubini avatar May 04 '19 20:05 matteotrubini

there is a new one with much more features: https://github.com/ABWebDevelopers/oc-imageresize-plugin https://octobercms.com/plugin/abwebdevelopers-imageresize

panakour avatar Jun 14 '19 06:06 panakour

@toughdeveloper if is possibile to change the origin of the plugin in the marketplace, please consider to create a GitHub organization where move the repo and nomenee other admins as it would make tasks like #65 easier

Maintaining the control of marketplace's account, any release will remain in pending status up to your final revision, preventing any malicious code to be distributed, am I correct?

matteotrubini avatar Oct 04 '19 07:10 matteotrubini

@matteotrubini @toughdeveloper @panakour @lthurston @maartenmachiels FYI: this plugin's functionality will shortly be included in the core by default thanks to some sponsorship from @beckandstone. See https://github.com/octobercms/october/pull/5231.

Please test out that PR (and the related TinyPNG plugin) and provide your feedback! Looking to have it merged in by next Wednesday.

LukeTowers avatar Aug 15 '20 07:08 LukeTowers

Thanks @LukeTowers ! To be sure, is there a chance of sites breaking when both the current plugin is installed side into an October instance with the resize functionality built in? I'd like to prevent situations where clients update their October instance, after which their site would break.

chocolata avatar Aug 15 '20 08:08 chocolata

@maartenmachiels nope! If a site is using a plugin that provides the | resize() filter already, then the plugin's definition would override the system definition, so the behaviour would remain unchanged for existing users of the plugin. They would just have to remove the existing plugin and then they'd start getting the benefits of the new functionality in the core which provides better performance and hopefully better stability.

LukeTowers avatar Aug 15 '20 08:08 LukeTowers

Thanks @LukeTowers for this, I think that core inclusion will be a great opportunity and IMHO it could end in this awesome plugin's depreciation.

Do you plan to include also images' dimensions filters? https://github.com/toughdeveloper/oc-imageresizer-plugin/blob/develop/Plugin.php#L64-L75

In my use cases them are needful - ex: https://photoswipe.com/documentation/faq.html#image-size

matteotrubini avatar Aug 17 '20 09:08 matteotrubini

@matteotrubini that would certainly be doable, I'll see if I can whip something up. It's a bit tricky because the new functionality supports remote disks, but I'll see what I can do.

LukeTowers avatar Aug 18 '20 02:08 LukeTowers

@LukeTowers - Great to see something happening with this plugin 👍 Thanks for taking the time to migrate the functionality to core.

Once it's merged and released, it would be my preference to try encourage users to remove this plugin in favour of the core functionality so they can receive new features, bug-fixes, etc.

The only drawback I can see of users making the switch is that it will invalidate the image cache and may lead to initial performance degradation.

How do you want to go about informing users? Possibly:

  • Update readme of this repository with deprecation notice and upgrade instructions
  • Push a major change with deprecation notice and upgrade instructions
  • Update readme within October CMS with deprecation notice and upgrade instructions
  • After a few months, remove the plugin from OctoberCMS.

matt-pawley avatar Aug 18 '20 07:08 matt-pawley

@LukeTowers save metadata's json file on resize? Using $path . '.metadata' you obtain strong relationship and this file can be managed by local cache as the orginal one.

@toughdeveloper I completely agree with you, And I would like to thank you once again for the work done during these years. :hugs:

I change the title of the issue to make it more on-topic. Once https://github.com/octobercms/october/pull/5231 is merged we should close this issue to open a new one focused only on migration progress.

matteotrubini avatar Aug 18 '20 09:08 matteotrubini

@toughdeveloper I would agree with that process, although I would remove the plugin from the marketplace when the functionality first releases, it's not going to remove it from any existing installs and new installs won't need to install it at all.

Upgrade instructions are pretty simple, basically you update the core and then run php artisan october:util purge uploads to purge the uploads directory of any files not referenced in the system_files table (as long as you aren't storing references to them elsewhere, and really this step is only to clean up your filesystem if you've been using it for a while).

LukeTowers avatar Aug 18 '20 19:08 LukeTowers

I believe that the |resize filter already does the job of this plugin. The only missing feature is image optimization. It would be nice if it gets added to the core.

PictureElement avatar Jan 28 '23 16:01 PictureElement

@PictureElement check out https://github.com/wintercms/wn-tinypng-plugin

LukeTowers avatar Jan 30 '23 04:01 LukeTowers