Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Image Optimization Framework was not initialized

I am having this error The Image Optimization Framework was not initialized. Verify the sprites directory exists. After creating the directory, restart the site or application.

The error is in this method Microsoft.Web.Samples.ImageOptimizations.EnsureInitialized() but I do have an App_Sprites directory and i have restarted several times, casini and IIS. I updated from version 0.3 to 0.4.

Any ideas about how to solve this?

I am using AspNetSprites-MvcAndRazorHelpers

like image 452
k-dev Avatar asked Aug 09 '11 18:08

k-dev


1 Answers

I had the same issue and probably the reason was that the folder App_Sprites was marked as read-only. Since my project was on source control, I either have to check it out or try a hackish way which is remove the read-only attribute from the folder.

So right click on App_Sprites folder -> Open folder in windows explorer -> Right click -> Properties -> Removed read-only

Also I check under the Security tab to see if I have enough permissions to write to the folder.

After all that I did a clean and Re-build and was able to build the application successfully.

like image 193
Habib Avatar answered Nov 16 '22 00:11

Habib