Following the discussion in #1358896: Flexible scheme and URI for image derivatives I'd like to add an hook_image_style_uri_token_query_alter()
invocation to allow third part modules to alter the creation of image derivatives.
This is not a workaround the image_suppress_itok_output
setting, but is meant to allow modules to selectively add/change/remove the token_query part of image styles.
The patch adds the hook and do not alter the standard URL creation if no modules implements it.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2610308-image_style_uri_token_query_alter-5.patch | 2.13 KB | thePanz |
#2 | 2610308-image_style_uri_token_query_alter-2.patch | 628 bytes | thePanz |
Comments
Comment #2
thePanz CreditAttribution: thePanz at Liip for FREITAG lab. AG commentedPatch attached.
Comment #3
thePanz CreditAttribution: thePanz at Liip for FREITAG lab. AG commentedComment #4
czigor CreditAttribution: czigor at Liip commentedThis looks reasonable. I see two things:
Comment #5
thePanz CreditAttribution: thePanz at Liip for FREITAG lab. AG commentedUpdated code and added documentation.
Comment #6
thePanz CreditAttribution: thePanz at Liip for FREITAG lab. AG commentedComment #7
thePanz CreditAttribution: thePanz at Liip for FREITAG lab. AG commentedComment #8
czigor CreditAttribution: czigor at Liip commentedThanks for the examples! This looks straightforward to me.
Comment #9
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedThis looks to me like it would need to go into Drupal 8 first, since the token query code is similar there?
Also, I wonder how many separate hooks we want here... would it make more sense to find a way to incorporate altering the token query into #1358896: Flexible scheme and URI for image derivatives instead?