Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Add support for Flex objects in Grav 1.7 #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

N-Parsons
Copy link

This PR resolves #21, and is similar to #22, but retains the check for being a Page (or now PageObject).

I have a few other changes planned (eg. processing on upload rather than save, and a CLI for generating missing images), so I'd be more than happy to take over maintenance of this plugin if you're no longer interested in maintaining it.

@skinofthesoul
Copy link

Hello there @N-Parsons, nice to see you're also interested in this plugin! I am currently in dire need of better automatic image handling in Grav because there's some issues with the built-in functionality, and hand-crafting images is out of the question for my clients. I haven't heard back since my own pull request from August last year, and I need a working plugin now, so I would start a new plugin with my fork. Like, right away. (Unless @fredrikekelund you would like to merge that?)

You can take a look at it if you like. Maybe it's useful to you as well? I have experimented with using Resize Images and putting a sizes directive for images in via Twig, but then Grav's native image handling kicks in and all but the smallest version of an image get eaten… and also I wanted different sizes attributes per class (because of portrait images mostly), so this version now has a plugin option to set the sizes directive per class, and that gets smuggled in onPageOutputGenerated. All these things could be made optional of course.

I also like your ideas! So maybe we could maintain the new plugin together? In theory it won't be necessary to keep forever since Grav's native image handling will get an overhaul at some point, but right now I think it'd be super useful.

Sorry for hijacking the pull request btw – didn't see how to make this public and also findable otherwise…

@N-Parsons
Copy link
Author

Hi @skinofthesoul, sorry for taking a while to respond.

I've ended up getting busy with other things, so this is plugin isn't a priority for me at the moment. It'll probably be a while before I circle back to this so it's probably best for you to maintain the fork and then I will send PRs when I find time, and if you haven't already implemented things by then.

Unless you are fundamentally breaking the way the plugin used to work, it's generally best to just take over ownership of the plugin, which you can do via the Abandoned Resource Protocol if you haven't already done so.

@skinofthesoul
Copy link

No stress, I know how it goes. I decided to create a fork as I wanted to add some functionality. If you're interested, check it out here: https://github.com/skinofthesoul/grav-plugin-automagic-images
Feel free to add to this if you find yourself needing more features at some point (1 click image regeneration would be awesome, but it's not on the top of my list either right now). I'll be keeping this plugin up until Grav's native image handling is fixed.

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

Successfully merging this pull request may close these issues.

Plugin does not resize images when used in Grav v1.7.0-rc.7 - Admin v1.10.0-rc.7
2 participants