Skip to content

Commit

Permalink
Merge pull request #28 from Drish-xD/dev
Browse files Browse the repository at this point in the history
fix: image loader
  • Loading branch information
Drish-xD authored Apr 28, 2024
2 parents aaa89aa + 01e499b commit 3117007
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 41 deletions.
74 changes: 37 additions & 37 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: Codacy CI

on:
push:
branches: ['main', 'dev']
pull_request:
branches: ['main']
schedule:
- cron: '40 13 * * 4'

permissions:
contents: read

jobs:
codacy-scan:
permissions:
contents: read
security-events: write
actions: read
name: Codacy Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
gh-code-scanning-compat: true
max-allowed-issues: 2147483647
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
name: Codacy CI

on:
push:
branches: ['main', 'dev']
pull_request:
branches: ['main']
schedule:
- cron: '40 13 * * 4'

permissions:
contents: read

jobs:
codacy-scan:
permissions:
contents: read
security-events: write
actions: read
name: Codacy Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
verbose: true
output: results.sarif
format: sarif
gh-code-scanning-compat: true
max-allowed-issues: 2147483647
- name: Upload SARIF results file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
5 changes: 1 addition & 4 deletions src/utils/imageLoader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { APP_URL } from '@/constants';

export default function imageLoader({
src,
width,
Expand All @@ -9,8 +7,7 @@ export default function imageLoader({
width: number;
quality: number;
}) {
const url = new URL(`${APP_URL}/_next/image/`);
url.searchParams.set('url', src);
const url = new URL(src);
url.searchParams.set('fm', 'webp');
url.searchParams.set('w', width.toString());
url.searchParams.set('q', (quality || 75).toString());
Expand Down

0 comments on commit 3117007

Please sign in to comment.