Keyword

[SOLVED] K2 image cache rebuild

More
8 years 4 months ago #159763 by Michael Yaeger
Replied by Michael Yaeger on topic [SOLVED] K2 image cache rebuild

Michael Yaeger wrote: We've added watermarks to all images in the site and replaced them on the server. However, K2 items do not display the updated images. Is running the above mentioned script required?

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago - 8 years 4 months ago #159777 by Michael Yaeger
Replied by Michael Yaeger on topic [SOLVED] K2 image cache rebuild
OK, I was able to run the script, but it simply took the images in the `src` directory and rebuilt them in the `cache` directory, which was not what I needed. My images were in the same location as when I uploaded them (Joomla! `images` directory). I was able to use this extension (K2 Import) to rewrite all the images by exporting the K2 database and importing it, again, since the extension gives you the option to choose the image source directory:
www.individual-it.net/en/Joomla/View-category.html

However, I still need a solution to rebuild the category images. It seems K2 discards the original image file location and rewrites all the images in the database and on the server with the category ID as the filename. That means all the information about the original file is LOST!

So, how can I rebuild all K2 category images from the original files in the Joomla! images folder?
Last edit: 8 years 4 months ago by Michael Yaeger.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 4 months ago #159787 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] K2 image cache rebuild
Unfortunately you will have to manually reupload these images.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
8 years 4 months ago #159815 by Michael Yaeger
Replied by Michael Yaeger on topic [SOLVED] K2 image cache rebuild

Krikor wrote: Unfortunately you will have to manually reupload these images.


I don't believe manually going into 481 categories in the K2 admin to upload images is a recommended task.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 4 months ago #159831 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] K2 image cache rebuild
I am sorry but this task is not included in that extension.
You can use an automation tool like Grunt if you want to downsize your images, if you are looking to decrease the size.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #165160 by TheAnt
Replied by TheAnt on topic [SOLVED] K2 image cache rebuild
Hello
I used the script with a J! 3.8.1/K2 2.8.0 site to resize the cached images. It worked to recreate the cache, but now I don't see the items main images anymore. If I open every item, no image is available in image tab. Maybe because the script used a different name for the cached files?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 5 months ago #165208 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] K2 image cache rebuild
Are you getting any 403/404 errors in your console?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #165238 by TheAnt
Replied by TheAnt on topic [SOLVED] K2 image cache rebuild

Krikor wrote: Are you getting any 403/404 errors in your console?

Yes, but for:
fontawesome-webfont.ttf Failed to load resource: the server responded with a status of 404 (Not Found)

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 5 months ago #165245 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] K2 image cache rebuild
Do you have any backups to compare the filenames?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #165276 by TheAnt
Replied by TheAnt on topic [SOLVED] K2 image cache rebuild
Hi Krikor
looking at the backup copy I see that the script ha created only a few files, into the cache there are 876 files, into the K2 media items one there are just some dozen.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 5 months ago #165289 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] K2 image cache rebuild
Reinstate the backup (don't lose it) and re-run the script while watching your error_log for potential php errors.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #165295 by TheAnt
Replied by TheAnt on topic [SOLVED] K2 image cache rebuild
re-uploaded the k2/item/cache folder
run the script, I get this message:
.File: ee842e3019fee30e4ca87cc93974d54b.jpg SUCCESSFUL .File: e7c0584255fa6f2981e510285a9e9e4f.jpg SUCCESSFUL .File: 5d9bd784bfd234610bf8ba15e7ad6a4e.jpg SUCCESSFUL .File: 948378d6a67ac0d7c7c6728581b072ab.jpg SUCCESSFUL .File: 5483e331a9bace540b3a2478fc014e25.jpg SUCCESSFUL .File: 1d73e13563b8be946c0f00bab252d7ea.jpg SUCCESSFUL .File: 8b6e33345ac8d5ffd9cf0d107a7d9e9d.jpg SUCCESSFUL .File: aaa082d2257ab65aecf61c2340e9c5b9.jpg SUCCESSFUL .File: 36fdb1a35cd2f54f95cf2119fb5bc7ed.jpg SUCCESSFUL .File: 88f135a483ef01fac8d7b920488085e4.jpg SUCCESSFUL .

no error in log file
again, only a few dozen of files in cache was recreated, I see the old ones for the rest

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 5 months ago #165331 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] K2 image cache rebuild
No Fatal Errors then.
I think you need to address this issue to the extension's dev.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 2 weeks ago - 7 years 2 weeks ago #167482 by MIRON
Replied by MIRON on topic [SOLVED] K2 image cache rebuild
Hello,
I'm sorry my english is bad.
I try the precedent php script.
As no change.
Images from k2 principal elements are wrong.
An idea ?
thanks
Last edit: 7 years 2 weeks ago by MIRON.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 2 weeks ago #167496 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] K2 image cache rebuild
Hello,

You need to address this issue to the extension's developer since we did not develop it.
You can try reaching out to him through Github.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 1 week ago #167583 by Alethea Strazza
Replied by Alethea Strazza on topic [SOLVED] K2 image cache rebuild
thank you!
Its very helpful.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 1 week ago #167588 by Krikor Boghossian
Replied by Krikor Boghossian on topic [SOLVED] K2 image cache rebuild
You 're welcome :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum