Skip to content

Commit

Permalink
Remove rewrite in image path
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlee85 committed Oct 27, 2023
1 parent 98aa47e commit 89c512d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/v7-image-optimization/edge-functions/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const generateImageCards = (wikimediaImages) => {
optimizations[index % optimizations.length];
return `
<div class="image-card">
<img src="/img-optimize${src}?${optimization}" alt="${description}">
<img src="${src}?${optimization}" alt="${description}">
<div class="info">
<p>${description} using: <pre><code>?${optimization}</code></pre></p>
</div>
Expand Down
11 changes: 1 addition & 10 deletions examples/v7-image-optimization/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,10 @@ export default new Router()
});
})

.match(/\/img-optimize\/(.*)/, {
.match('/:path*', {
origin: {
set_origin: 'wikiupload',
},
url: {
url_rewrite: [
{
source: '/img-optimize/(.*)',
syntax: 'regexp',
destination: '/$1',
},
],
},
response: {
optimize_images: true,
},
Expand Down

0 comments on commit 89c512d

Please sign in to comment.