Skip to content

Option to disable default width of 500px and option to maintain the original rotation #343

@jimping

Description

@jimping

I have the following code

const { expressSharp, HttpAdapter } = require('express-sharp')

const express = require('express');
const cache = require('express-cache-headers')
const Keyv = require('keyv');

const app = express();

app.disable('x-powered-by');
app.use(cache(315360000))

app.use(
  '/storage',
  expressSharp({
    imageAdapter: new HttpAdapter({
      cache: new Keyv('redis://cache', { namespace: 'connect-sharp' }),
      prefixUrl: 'https://connect.5-anker.com/storage',
    }),
  })
)

When I embed the following image without a specified width/height I get an auto width of 500px and the rotation is wrong:

"Sharped":
https://assets.5-anker.com/storage/boat/planenvariante-4-bug-humfree-nofreetete-freedy-gonzales-freewatuut-alfreedojpg_6516e5d7b14a6.jpg

"Original":
https://connect.5-anker.com/storage/boat/planenvariante-4-bug-humfree-nofreetete-freedy-gonzales-freewatuut-alfreedojpg_6516e5d7b14a6.jpg

How do I maintain the original width and rotation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions