Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Image scaling in articles

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi,

please see attached images. I have three images with 640/320/160 px (native) width respectively. When inserted in article, in backend they scale correctly. All fine. (Image 1)

However, in Frontend they get blown up to always fill the whole container. (Image 2).

I seem to remember that that was an option somewhere ('fill container') but I can't remember where that was. Can you point me in the right direction?

Also when I publish the article in a module (using 'Articles-anywhere' extension) the images scale correctly. (Image 3)

Thanks for a quick pointer.
Attachments:
  • peter_schmitz's Avatar
  • peter_schmitz
  • LIfetime Developer - Big Bamboo
  • 77 posts
  • 1 Thanks
  • Karma: 1
The administrator has disabled public write access.
Hi

Do you have a link for the page?

Thanks
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
I have uploaded the site now so you can have a look. But first there seems to be yet another issue in that after uploading it doesn't find the zentools 2 slideshow images anymore. Every item under the 'You need /sales training' menu has a ZT2 slideshow in the banner position.

However, It keeps looking in the

/mysite//media/mod_zentools2/cache/images/

The slideshow is set to images and fetches images from folders. Except it doesn't now but instead fetches them from the /cache folder, were apparently after changing to live site can no longer be found under their original name. Once I put an image under the adress that it is looking, the image is displayed properly.

Can I reset this to once again fetch the images from the original folder?

You can check this on

www.b2bwinloss.com/schmitzj3
  • peter_schmitz's Avatar
  • peter_schmitz
  • LIfetime Developer - Big Bamboo
  • 77 posts
  • 1 Thanks
  • Karma: 1
Last Edit: 8 years 6 months ago by peter_schmitz.
The administrator has disabled public write access.
Are you on the latest extension version?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Yes 1.1.4, actually just upgraded this morning to eliminate that source.

Did some further testing and in the local version when I delete the cache in

media\mod_zentools2\cache\images

everytime I call a new page on the frontend, immediately a new cache item is built. Which is how it is supposed to be presumably.

Not so on the live site. If you look on the livesite, it acutally pulls the title correctly from the original file, but it is unable to build the cache for some reason. Also changed the mod_zentools2 to 777 for test purposes but no difference.
  • peter_schmitz's Avatar
  • peter_schmitz
  • LIfetime Developer - Big Bamboo
  • 77 posts
  • 1 Thanks
  • Karma: 1
Last Edit: 8 years 6 months ago by peter_schmitz.
The administrator has disabled public write access.
Hang on, after changing file properties of all files and folders in mod_zentools2 including all subfolders and subfiles it now works. But that can't be the solution, can it?
  • peter_schmitz's Avatar
  • peter_schmitz
  • LIfetime Developer - Big Bamboo
  • 77 posts
  • 1 Thanks
  • Karma: 1
The administrator has disabled public write access.
Ok, definitely, with the mod_zentools2/cache/images folder on 755 it doesn't work, but with 777 it does. Is that correct that way? Why need 'others' writing rights?
  • peter_schmitz's Avatar
  • peter_schmitz
  • LIfetime Developer - Big Bamboo
  • 77 posts
  • 1 Thanks
  • Karma: 1
The administrator has disabled public write access.
Hi Peter,

I'm not sure what the solution is with this at the moment but please till its fixed don't leave the folder at 777

I'm afraid it may be Monday before I hear back

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Ok, not a prob. Will reset rights to 755.

Release date is drawing closer, so might you on Monday also once again chase my other issue (one with the menu)?

Thanks

Peter
  • peter_schmitz's Avatar
  • peter_schmitz
  • LIfetime Developer - Big Bamboo
  • 77 posts
  • 1 Thanks
  • Karma: 1
Last Edit: 8 years 6 months ago by peter_schmitz.
The administrator has disabled public write access.
Hi Peter,

Normally when things liek the cache folder are't writable after upload it's because of an ownership issue - eg the user on the new server doesn't have write access to that folder.

So you could do a few things but I think if you did the following it would solve the issue:

1. Reinstall Zentools. Don't uninstall.
2. Then if the issue persists rename the cache folder. That will get created on the first page load so the folder should have the correct ownership and permissions.

Images get loaded from the cache folder if you have the image resize option enabled.

There is also an option to make the images fill the width of the container so that may be enabled on your site which is causing the images to fill the width.
Thanks
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Reinstalled Zentools and renamed Cache folder. Had to temporarily make whole mod_zentools2 folder 777. Now Zentools appears to have been able to re-take controle over the cache folder, since I am prohibited in FileZilla and Plesk to manually delete any files in the cache folder. Would that be an indication? There are in any event cache files being written once again in the cache/image folder upon page load. So that seems to be sorted.

Two questions: the files in the cache/image folder seem to be significantly larger (100k compared to 50k for the original) than the original files. Is that normal or is this due to zentools resizing and filling the size of the container?

Second, there don't appear to be new cache image files to be created as I resize the browser, despite the fact that the images are being displayed in different sizes. Also when I call a page from a mobile phone a full-size image file is being created. Is that normal?
  • peter_schmitz's Avatar
  • peter_schmitz
  • LIfetime Developer - Big Bamboo
  • 77 posts
  • 1 Thanks
  • Karma: 1
Last Edit: 8 years 6 months ago by peter_schmitz.
The administrator has disabled public write access.
Hi Peter,

1. Can you add a link tot he original image so I can see?

2. The responsive image options havent been added to zentools2 yet. It's certainly coming but didn't get added to the initial release.

Thanks!
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
Anthony,

here's two examples:

1) Original pic (40785 Bytes): www.b2bwinloss.com/schmitzj3/images/collaboration/The Make or Buy Decision.jpg

1) Cache pic (80943 Bytes):
www.b2bwinloss.com/schmitzj3/media/mod_zentools2/cache/images/The Make or Buy Decision-708d2ec3e27098eaecc0e80667a5ee25.jpg

2) Original pic (57300 Bytes): www.b2bwinloss.com/schmitzj3/images/execpitch/proof of the pudding.jpg

Cache pic (100157 Bytes): www.b2bwinloss.com/schmitzj3/media/mod_zentools2/cache/images/proof of the pudding-71f322e85353f379d271aa4052fe774d.jpg

Pic Creation Process is to save in Photoshop with 'save for web and devices' option.

2) Understand about the responsive pic feature. My brain needs to sort this, so just quickly, what is the way by which using the cache creates a faster loading then? Or are you saying, once that responsive pic feature is available, it will?

Conclusion: If Cache pic sizes are larger than originals, should I - for now - leave resizing off and manually scale pictures in Photoshop to exactly fit the container if I want to optimize page loading times?
  • peter_schmitz's Avatar
  • peter_schmitz
  • LIfetime Developer - Big Bamboo
  • 77 posts
  • 1 Thanks
  • Karma: 1
Last Edit: 8 years 6 months ago by peter_schmitz.
The administrator has disabled public write access.
Apologies for the delay.

1. In some cases depending on the image and the resize options chosen the image resizer will actually resize an image up. So for the first image the resized image is slightly larger.

But that doesn't explain the second image being so large.

I think the issue may relate to the quality we resize at. It's set to 90% but save to web often resizes to 80% or so. I wouldn't have thought that would cause an issue since you can't improve the quality of an already resized image. I think I will add an option to define the image quality in the resizer and see if that helps.

2. Cached images are really just for when you resize the image. An unresized image will be cached in the browser so if the user loads it again it wont have to load the image again. Theoretically making the image smaller via the resizer the images will be smaller but your examples above question that :)

Re how to proceed - yes I think thats the best option. Since the resized images are close to the original anyway.

Which crop ration are you using? Smart crop?

Thanks
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers