Problem/Motivation

Editors can upload big images or no web-optimized.

Adding a option to select a Image Style will be more flexible for editors.

Steps to reproduce

Proposed resolution

If we want this to be optional, add a checbox and then a select with all Image Styles availables, this could be done per plugin instance, not global settting.

Update buildBackgroundMediaImage funciton to create image url using the Image style selected.
This could help: https://gist.github.com/slivorezka/925dff0369e8eddc7e4ffa4801ab0240

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#14 3167538-14.patch5.12 KBsardis
#12 3167538-12.patch5.4 KBmauriciopieper
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

edysmp created an issue. See original summary.

aaronchristian’s picture

This is a much needed enhancement!

Love your thinking @edysmp

nitesh624’s picture

Working on it will update in few days

nitesh624’s picture

Assigned: Unassigned » nitesh624
nitesh624’s picture

Unassigning from me , so that others can also work

nitesh624’s picture

Assigned: nitesh624 » Unassigned
edysmp’s picture

Issue summary: View changes
mahmoud-zayed’s picture

Status: Active » Needs work

matt_paz made their first commit to this issue’s fork.

matt_paz’s picture

Status: Needs work » Needs review
mauriciopieper’s picture

StatusFileSize
new5.4 KB

Created this patch based on the merge request from @matt_paz.
I did some small changes/improvements because it was an old MR, but in essence, it does the same.

b_sharpe’s picture

Status: Needs review » Needs work

This need to be passing the interface FileUrlGeneratorInterface otherwise you'll have issues with other file generators.

sardis’s picture

Status: Needs work » Needs review
StatusFileSize
new5.12 KB

@b_sharpe is right indeed. Such an error can be reproduced should you enable CDN module.

Attached is an updated patch that uses FileUrlGeneratorInterface instead of FileUrlGenerator.

rajab natshah’s picture

Status: Needs review » Needs work

Thanks, for reporting and patching!

While you are making the above changes, we recommend that you convert this patch to a merge request. Merge requests are preferred over patches. Be sure to hide the old patch files as well.

rajab natshah’s picture

Status: Needs work » Fixed
Issue tags: +bootstrap_styles-1.1.6, +bootstrap_styles-2.0.0-alpha1
rajab natshah’s picture

rajab natshah’s picture

Status: Fixed » Needs work
Issue tags: -bootstrap_styles-1.1.6, -bootstrap_styles-2.0.0-alpha1
rajab natshah’s picture

super_romeo’s picture

Thanks for the patches #12 and #14. They are on the right track.
But I think we need to set the responsive image style, not the image style.