Try our conversational search powered by Generative AI!

Error on Geta Image Optimization Job

Vote:
 

Hi Team,

We have integrated the Geta Image Optimization nuget package with our episerver web project. While running the job it threws the below error on the job history.

Could not load type 'EPiServer.Web.Routing.UrlResolver' from assembly 'EPiServer, Version=11.9.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7'.

Episerver version : 11.9.3

Geta Nuget Version : 0.5.1

Kindly help us...

#197145
Sep 24, 2018 17:16
Vote:
 

Hello Mathan

UrlResolver is marked as abstract in Episerver 11: https://world.episerver.com/documentation/Class-library/?documentId=cms/11/D4E69E2. So I suspect the line in the source is the one causing the problem: https://github.com/Geta/ImageOptimization/blob/3bec81aaec0cea6718ba65a8fbee7e91a2293881/Geta.ImageOptimization/Helpers/ContentExtensions.cs#L21. The fix could be to get IUrlResolver instance instead.

The package is an open source project so I suggest you could fix the issue and send a pull request to the author. I've raised it as an issue on the project on GitHub if you want to contribute: https://github.com/Geta/ImageOptimization/issues/7

David

#197151
Edited, Sep 24, 2018 21:49
Vote:
 

thanks David!

#197164
Sep 25, 2018 12:26
Vote:
 

Thanks, David. Appreciated!!!

And, We could see the auto image optimization in the Q2 EPiServer release. 

https://www.episerver.com/products/features/new-features/episerver-q2-18-release/

We are running on the CMS version 11.9.3. Will the auto-optimization enabled on our version? Do we need to set up any configuration to bring on our site? If it possible, How can we optimize the existing images? 

Kindly help us...

#197234
Edited, Sep 26, 2018 15:25
Vote:
 

Hello Mathan

If you are on Episerver Digital Experience Cloud Service (DXC) then it should be automatically applied. 

David

#197235
Sep 26, 2018 16:15
Vote:
 

Hi David,

What about other than DXC? Wont it apply or Do we need to do any implementation? Kindly update us...

#197286
Sep 27, 2018 17:18
Vote:
 

Hello Mathan

The automatic image optimisation is provided as part of the Digital Experience Cloud Service (DXC-S) at an infrastructure level. The idea of DXC-S is that it provides partners and customers a service to run Episerver on. So the automatic optimisation isn't provided as part of the software but as part of the service. So I am afraid its not available if you are running a licenced version of Episerver and you will need to find other solutions to your problem. I have previosuly blogged about automatically compressing images when they are first uploaded to Episerver using TinyPNG here:

https://www.david-tec.com/2017/02/using-tinypng-to-automatically-compress-images-in-episerver/ 

David

#197289
Sep 27, 2018 22:07
Vote:
 

Geta Image Optimization Job is working good after the version upgrade.
There was only two changes needed after dll upgrade.

1. BlobFactory in ImageOptimizationJob.cs got deprecated, 

change BlobFactory as IBlobFactory - var blobFactory = ServiceLocator.Current.GetInstance<IBlobFactory>();


2. BuildUrl() in SmushItProxy.cs was returning invalid url due to endpoint variable, returning empty string as value 

change endpoint - string endpoint = "http://api.resmush.it/ws.php"; or give the value in web.config

#197686
Oct 10, 2018 15:57
Vote:
 

better require that `IBlobFactory` dependency from constructor. avoid ServiceLocator.

#197688
Oct 10, 2018 16:03
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.