Query string parameters (wordpress support)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- aws, typescript, wordpress
- Domain
- cloud, performance, web-dev
Research direction
Start by reviewing the repository's CloudFront function and any Lambda entry points to see how format, width, height, and quality are currently parsed. Compare that behavior with the WordPress sample URL and determine whether query-parameter translation or a WordPress plugin fits the project; done requires an agreed scope and verified handling of the requested parameters.
Written by the indexing model from the issue text.
Description
Hi all,
I have a question regarding the query string parameters that are being passed for image transformations. On inspection of the cloudfront function, it appears as though the optimizer supports 4 query string parameters for performing image transformations (format, width, height and quality). The issue that I'm experiencing is that frameworks such as Wordpress have specific parameters that are used in image URLs, for example 'h' and 'w' for height and width respectively, which doesn't get parsed by the CF function. Other query string parameters that typically get used by image optimization CDN's include 'q' for quality, 's' for security keys, etc..
In short, anyone attempting to implement this image optimization solution on a wordpress site won't have any luck doing so unless the URIs are constructed/transformed appropriately on the web server before the image is called via the optimizer CF distribution (which isn't currently viable).
Is there a simple way to achieve this? Essentially, the requirement would be to transform the below sample URL (the first being a wordpress image url with transformation parameters) into one that can be properly interpreted by the image optimizer (second sample url):
-
Wordpress URL which includes dimensions and other image optimizer query strings (supported by Imigix, etc.):
hxxp://sample-image.jpg?q=50&h=500&w=500&s=123456789 -
URL that AWS image-optimizer expects:
hxxp://sample-image.jpg?format=auto&height=500&quality=50&width=500
Assuming the answer will require modifying the cloudfront function (and maybe a lambda function or functions)...
Alternatively (and possibly a big ask) but having a co-pilot wordpress plugin developed that would do exactly this for image URLs would be the best solution by far, avoiding having to spin up a custom branch for maintaining this stack to achieve image optimization for wordpress websites.
Many thanks and I look forward to your reply.
- Dominant language
- TypeScript
- Stars
- 276
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-samples/image-optimization
-
CDK CLI and aws-cdk-lib version mismatch leads to deployment errorsMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aws-samples/image-optimization#79 · 1 comment ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
bug wontfix
Difficulty 4/5 3-5 days Newbie friendliness 35/100
aws-samples/image-optimization#65 · 1 comment ·
-
[Feature request] Supply original image from original S3 bucketMay be free again @achrafsouk claimed this 427 days ago, and no pull request is open. Open
aws-samples/image-optimization#47 · 1 comment · 1 assignee ·
All issues in aws-samples/image-optimization
Similar issues
-
bot:ai-assisted status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
midnightntwrk/midnight-js#1424 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mksglu/context-mode#1268 ·
Maintainers usually reply within 5 days
-
[bug] Setup fails with "Cannot find matching keyid" when an older Node's corepack is on PATHPossibly taken @EyalPoly claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
MystenLabs/MemWal#1124 · 2 comments ·
Maintainers usually reply within 1 day
-
Edit:Opencheck:failed streams:edit
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
iptv-org/iptv#54352 · 1 comment ·
Maintainers usually reply within 1 day