Open spacedmonkey opened 2 years ago
@felixarntz Looks like this needs to push to 1.4.0 as there isn't a PR, can you confirm?
I don't think we can add this to the performance plugin as it needs a core patch https://github.com/WordPress/wordpress-develop/compare/trunk...pbearne:wordpress-develop:use_dominat_color_in_media_libary?expand=1
Thanks @bethanylang @pbearne. Definitely won't make it in time for 1.3.0, but if it's not feasible in the plugin anyway, let's remove the milestone entirely and keep this simply as a tracking task for the core patch work.
I don't think we can add this to the performance plugin as it needs a core patch https://github.com/WordPress/wordpress-develop/compare/trunk...pbearne:wordpress-develop:use_dominat_color_in_media_libary?expand=1
Thanks for sharing this code sample @pbearne I see how adding this in core would be much easier, however I'm going to dig in a little more to see if we can add the correct classes to the template. A possible solution would be to unhook core's template and insert our own instead (add_action( 'admin_footer', 'wp_print_media_templates' );
)
Is this "dominant color" idea only supposed to exist in the media library? It keeps adding "dominant colors" to PNG images etc., in site layouts etc., where there shouldn't be solid colors, according to design. I keep deinstalling updates of Performance lab and reverting files back to version mentioned in comment above. I'm advising admins and other users against updating this plugin until this is sorted out.
This feature might be useful if it was an option that could be activated or not - per user/admin choice - checkbox?
I'll do a pull or a fork or something if I have time, maybe. Thanks.
@estlacksensory The dominant color module adds background colors to newly uploaded images throughout the site. This should only have any visual effect when those images haven't loaded yet though. If you see any adverse effects, could you please open a separate bug issue describing the problem?
Separately, you can always disable the Dominant Color Images module, by navigating to Settings > Performance and toggling off the corresponding checkbox.
Thanks @felixarntz - perhaps this was fixed with a recent update. I'll describe in further detail where I think someone else opened a bug report.
Feature Description
Use dominant color as background color in media modal for preview thumbnail.
Follow on from https://github.com/WordPress/performance/issues/19 https://github.com/WordPress/performance/pull/282