By Tristan on Friday, 24 May 2019
Posted in Technical Issues
Replies 12
Likes 0
Views 688
Votes 0
We use the Speecache extension lazy loading feature on our website.
Unfortunately we can't use it with Easyblog posts.
From the search we've done, it seems that Easyblog script is removing some attributes from the images included in the posts.
Some of these attributes are required for our lazy loading to work correctly.
You can see the issue here by scrolling down.
https://www.joomunited.com/news/get-ready-for-wordpress-4-4
When removing the script https://cdn1.joomunited.com/media/com_easyblog/scripts/site-5.2.14.min.js it works as expected.
Could you share the original unminimized version of the /media/com_easyblog/scripts/site-5.2.14.min.js file so we can debug this problem.

Best regards
Hey there,

I am really sorry for the delay of this reply as it is a weekend for us here.

We do not have unminify version for this script file, because we compile all the different Easyblog script file together.

Perhaps you can provide us with your site backend and FTP access so we can try check on this?

Or you can send me that pagespeed extension installer and guide us how to enable this image lazy load functionality?

And can you elaborate more details which kind of attributes required for our lazy loading to work correctly?
·
Saturday, 25 May 2019 08:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

We have the same problem on the stating website where you have all the details already submitted https://staging.joomunited.com/news/get-ready-for-wordpress-4-4
BTW it works on other posts because we use files from the Droppics component.

Here is an image tag modified by the Speedcache extension
<img class="speedcache-lazy speedcache-lazy-hidden" style="margin: 0px auto; display: block;" alt="JoomUnited logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=" data-speedcachelazy-src="/images/JoomUnited-logo.png" width="100%" />

The extension uses the class and data-speedcachelazy-src attributes

Please let me know if you need anything else.

Best regards
·
Saturday, 25 May 2019 16:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Tristan,

I am sorry for the delayed of this reply because I still investigate on this issue.

Is it possible for you provide us that speedcache extension installer and guide us how to setup this in my locally in order to make this lazy image load?

Because I would like to test something is it because of these code caused this speedcache unable process lazy load image work.

We do have a script to inject some of the data attribute into image so it can able to show the pop up if user want that image show the pop up.

And I did noticed, if those image doesn't add to show pop up, it will work correctly with the lazy image load, you can take a look this post. https://staging.joomunited.com/news/just-in-time-lazy-loading-on-wordpress
·
Monday, 27 May 2019 15:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

You can download it here http://staging.joomunited.com/Speed%20Cache.zip

Install the extension, go to the extension main configuration page and activate the lazy loading as in the screeshot attached.
The lazy loading should then be activated on frontend pages.

Best regards
·
Monday, 27 May 2019 17:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Try download my attached file and replace into this JoomlaFolder/media/com_easyblog/scripts/site-5.2.14.min.js on your live site and see whether can solve that issue.

But those image pop up feature unable to work now except post cover, because post cover HTML structure is different than the blog content image.

If you compose a new blog using build-in composer, it will work correctly because the script only get trigger if the blog post compose using wysiwyg editor.

By the way, ensure that this JavaScript file load the latest code, because sometime it might be cached on the browser or your server cache.

You can refer my attached screenshot which code I remove it.
·
Monday, 27 May 2019 18:20
·
0 Likes
·
0 Votes
·
0 Comments
·
I can confirm it works now for lazy loading, replacing this

b(),
by

;


But this modification has to be done each time EasyBlog will be updated? Or will you add this to your code?

Best regards
·
Monday, 27 May 2019 20:26
·
0 Likes
·
0 Votes
·
0 Comments
·
But this modification has to be done each time EasyBlog will be updated? Or will you add this to your code?

Yes, you have to manually modify this from the latest minified JavaScript file, because this speedcache will inject their data attribute code in each of the page image first because it trigger it from the plugin if I am not wrong, then only load our script, this is why you noticed Easyblog script removed those speedcache data attribute.
·
Tuesday, 28 May 2019 10:15
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi,

In my opinion, modifying a minified file is not a good idea,for a production server.
As it's a minified version, I can't be sure that what I will remove in the next version won't break anything else.

The other point is that we are selling the SpeedCache extension and we'd like it to be compatible with Easyblog.

We do not have unminify version for this script file, because we compile all the different Easyblog script file together.

This file may contain a lot of your sources file but you should have a source file for the part of the script generating the conflict.
If we could have access to this file we could then find a fix in common:
For example, if you find the "speedcache-lazy" class in an image then you don't call the b() function and in our side if we detect that the page is an easyblog one, we can trigger the function that initiliaze the popup feature when the image has been loaded.

Best regards
·
Tuesday, 28 May 2019 17:01
·
0 Likes
·
0 Votes
·
0 Comments
·
We will see if we can do something about this in Easyblog 5.3.
·
Tuesday, 28 May 2019 18:52
·
0 Likes
·
0 Votes
·
0 Comments
·
That would be wonderful!
Please let me know if you need anything else.

Best regards
·
Tuesday, 28 May 2019 20:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Sure.
·
Wednesday, 29 May 2019 09:51
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post