You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For images inside project's wwwroot folder ,ImageSharp works fine while changing query parameters.But for images loaded using virtual directory ,from another server does not get processed by ImageSharp.
For example: https://localhost:44305/media/Min-04.jpg/?quality=50&width=500&format=jpeg
Any work around for this?
I'm rendering virtual images like this,
var virDirImages = new FileServerOptions
{
FileProvider = new PhysicalFileProvider(@"\server1\projectname\wwwroot\media"),
RequestPath = new PathString("/media"),
EnableDirectoryBrowsing = false
};
services.AddImageSharp()
.SetRequestParser()
.Configure(options => options.ProviderRootPath = null)
.AddProvider()
.AddProcessor()
.AddProcessor()
.AddProcessor()
.AddProcessor()
.AddProcessor()
.AddProcessor();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For images inside project's wwwroot folder ,ImageSharp works fine while changing query parameters.But for images loaded using virtual directory ,from another server does not get processed by ImageSharp.
For example:
https://localhost:44305/media/Min-04.jpg/?quality=50&width=500&format=jpeg
Any work around for this?
I'm rendering virtual images like this,
var virDirImages = new FileServerOptions
{
FileProvider = new PhysicalFileProvider(@"\server1\projectname\wwwroot\media"),
RequestPath = new PathString("/media"),
EnableDirectoryBrowsing = false
};
services.AddImageSharp()
.SetRequestParser()
.Configure(options => options.ProviderRootPath = null)
.AddProvider()
.AddProcessor()
.AddProcessor()
.AddProcessor()
.AddProcessor()
.AddProcessor()
.AddProcessor();
app.UseFileServer(virDirImages);
app.UseImageSharp();
app.UseStaticFiles();
Beta Was this translation helpful? Give feedback.
All reactions