-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images are incorrectly encoded after Azure Functions Deployment #100
Comments
Got this ever resolved, because I have the same issues with fonts aswell. async function handle(context, req) {
const url = "/" + (req.params.url || "");
const { body, status, statusText, headers } = await nitroApp.localCall({
url,
headers: req.headers,
method: req.method,
body: req.rawBody
});
context.res = {
status,
headers,
body: body ? body.toString() : statusText
};
} for static assets we use promises.readFile("./font.woff").then((e) => {
const ogLen = e.length;
const stringLen = e.toString().length;
console.log({ ogLen, stringLen });
});
// { ogLen: 561776, stringLen: 532428 } If I change it to |
@danielroe hey mate any update on this one? |
@markgibbons25 I tried this using The patch file is at https://github.com/Freegle/iznik-nuxt3/blob/master/patches/nitropack%2B2.1.0.patch This issue was a godsend, as I was struggling to track down the problem, but loading an SVG successfully confirmed it was this one. |
i'm also experiencing this problem with the favicon and images deployed to azure functions. the fix @mcremer-able describes fixes the issue in my case too. |
When deploying a Nitro app with the
azure-functions
preset, static Images such as .pngs and .jpgs are rendered incorrectly. (They are converted to string, which messes with their encoding.)Issues to check:
context: nuxt/nuxt#12677
The text was updated successfully, but these errors were encountered: