Skip to content

Commit 528b31a

Browse files
committed
prevent browser context menu from downloading images instead of opening in tab
1 parent 11227e4 commit 528b31a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

next.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ const nextConfig = {
5454
trailingSlash: true,
5555
serverExternalPackages: ['rehype-preset-minify'],
5656
outputFileTracingExcludes,
57+
images: {
58+
contentDispositionType: 'inline', // "open image in new tab" instead of downloading
59+
},
5760
webpack: (config, options) => {
5861
config.plugins.push(
5962
codecovNextJSWebpackPlugin({
@@ -71,7 +74,7 @@ const nextConfig = {
7174
DEVELOPER_DOCS_: process.env.NEXT_PUBLIC_DEVELOPER_DOCS,
7275
},
7376
redirects,
74-
rewrites: async () => [
77+
rewrites: () => [
7578
{
7679
source: '/:path*.md',
7780
destination: '/md-exports/:path*.md',

0 commit comments

Comments
 (0)