It would be nice if on the admin/config/media/image-styles screen a "duplicate" action could be added for existing image styles. This action should copy the selected image style and its effects to a new image style with a name like e.g. "copy of
". The use could subsequently change the name and change some of the effects. Use case: when you have to define several image styles that consists of multiple effects and only differ in 1 effect.
Comment | File | Size | Author |
---|---|---|---|
#1 | drupal-duplicateimagestyles-1403962-1.patch | 3.25 KB | geoffreyr |
Comments
Comment #1
geoffreyr CreditAttribution: geoffreyr commentedI've prepped a patch that adds this duplication functionality to the image styles list. It names the duplicates "foo-copy" unless there's already a "foo-copy", in which cases it appends the current date and other details to ensure uniqueness.
Comment #2
geoffreyr CreditAttribution: geoffreyr commentedComment #3
geoffreyr CreditAttribution: geoffreyr commentedComment #4
geoffreyr CreditAttribution: geoffreyr commentedThis might be backportable to D7; it doesn't introduce any API changes, but does add one menu item and adds new links to the image styles list.
Comment #5
eugen80 CreditAttribution: eugen80 commentedsubsc
Comment #6
fietserwinSorry for not reacting to your effort for so long.
I backported your code to D7, but in the contrib module imagecache_actions. This made it a bit more difficult, though the API function is more or less the same.
I changed the following (and this is the "needs work" on your patch):
See the 7.x-1.x-dev version of the imagecache_action module.
Comment #7
fietserwinAdded "needs tests" as we want some tests for this new functionality. I am not sure anymore about the "needs backport" as that is now in contrib, though it definitely should end up in core in D8. Did not remove it for now.
Comment #8
cweagansFixing tags per http://drupal.org/node/1517250
Comment #9
paskainos CreditAttribution: paskainos commented@fietserwin nice work! The D7 backport works great too. I didn't see anywhere else to post backport test success, so I'm posting it here.
Comment #10
tahiticlic CreditAttribution: tahiticlic commentedHi,
I've just downloaded imagecache_actions 1.4 and dev versions, neither one nor the other does bring the duplicate or import/export functionnality.
Is there something more to do to get the functionnality ?
Regards,
[Edit] Oups, my mistake : I didn't check the modules after installing dev version, there's indeed an admin module, thanks for this work!
Comment #19
FiNeX CreditAttribution: FiNeX as a volunteer commentedHi, you can use entity clone module to duplicate image styles (and responsive image styles too).