Jump to content

Other image versions rendered and found in site > assets > files

Recommended Posts


Not sure I'm in the right section.

I've just noticed something.

In site > assets > files, there are folders apparently named after the id of the page in which the images are inserted in the admin.

I'm developping a website locally this time, with version 2.5.0 now after an upgrade.

It is the same for the first gallery rendered (before the upgrade) on it's own page and for the second gallery that've I've just rendered on the parent page of the page in which the images are inserted in the admin.

For the first "gallery", the code is:

foreach($page->children('include=hidden') as $child) {
	$thumb = $child->images->first()->width(320);
	echo "<a href='$child->external_url' target='_blank' rel='nofollow'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a>";

(I've just updated this gallery code from width='320' height='200' to width='$thumb->width' height='$thumb->height')

For the second gallery, it is:

foreach($pages->get(1032)->images as $image) {
	$thumb = $image->width(90);
	echo "<a href='$image->url'><img src='$thumb->url' width='$thumb->width' height='$thumb->height' /></a>";

For the first gallery, there are these versions:

the original version (640x400), the .320x0.png version (320x200), in two folders a .300x212.png version (300x187 - perhaps old images with dimensions that I tested...(?)), and a .0x100.png version (160x100).

For the second gallery, there are these versions:

the original version (640x480), the .90x0.jpg version (90x68), and again a .0x100.jpg version (133x100).

Where can I disable the creation of this .0x100.jpg version, in which file, is it "normal"?

Thanks in advance :)!

Edited by kongondo
Wrapped code in code tags

Share this post

Link to post
Share on other sites

It's possible it's simply because I'(ve) inserted the images in the admin before inserting the code in the template file.

Edit: I've tested with a third gallery, I've created the code before inserting the images in the page via the admin, it seems to be the same, there is always a .0x100.jpg version for each image.

Perhaps it's defined in /wire/ (?).

Share this post

Link to post
Share on other sites

The 100 versions are for the admin - if you have "display thumbnails in page editor" checked on the Images field Input tab.

  • Like 3

Share this post

Link to post
Share on other sites

@Christophe, edited your first post. Please use code tags to wrap code blocks...its the <> icon :-). Just makes it easier to read code :-)

Share this post

Link to post
Share on other sites

@adrian. Yes, there are thumbnail images, so it's normal :). I really need to go to sleep earlier, sleep more/better and have a healthier life :).

@kongondo. I didn't use code tags this time because it created a horizontal scrollbar, so it seemed less readable at the moment I put it. But it's ok :).

  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By hellerdruck
      Hi all
      I need help with something. Situation: We have let's say 2'000 Files (Excel) that should be displayed (list with links) on a page. We'd need to filter these files by given Keywords or a tree structure or both. Now, I'm looking for a solution whereas our customer can synchronise the files from his local computer with the folder on the webserver. They will update and upload files on a daily basis. Therefore, it would need to synchronise rather than load the files manually in pages or repeaters. Maybe indexing would be an idea, too.
      Are there any modules for Processwire that would help achieving this? Could anyone point me in the right direction?
      Thanks in advance.
    • By horst
      Hi, on a site I want to disable access to original images and only allow to access thumbnails and watermarked image variations.
      A good solution for protecting original images can be found a bit down in this thread:
      Old content of this initial post:
    • By Guy Incognito
      I seem to be running into a repeated fatal error in a fresh PW install version 3.0.148. I can't quite put my finger on the pattern but it seems to be around deleting image fields or removing images from certain image fields.
      This is the trace from the log generated by trying to save a page and delete an image from an image field:
      Fatal Error: Uncaught Error: Cannot access protected property Pageimage::$original in /wire/core/PageimageVariations.php:256 Stack trace: 1. /wire/core/Pageimage.php(1327): PageimageVariations->getInfo() 2. /wire/core/Wire.php(386): Pageimage->___isVariation() 3. /wire/core/WireHooks.php(823): Wire->_callMethod() 4. /wire/core/Wire.php(450): WireHooks->runHooks() 5. /wire/core/Pageimage.php(1369): Wire->__call() 6. /wire/core/Pageimage.php(399): Pageimage->getOriginal() 7. /wire/core/WireData.php(333): Pageimage->get() 8. /wire/core/PageimageVariations.php(256): Pro Line 256 of /wire/core/PageimageVariations.php Earlier in the day I was experimenting with custom fields for images for the first time and kept running into this error, thinking it was me using this feature wrong and not having time to read up I deleted the custom image fields template and went about my business. So now I don't know if I triggered an issue or whether it was never related to the custom image fields in the first place?
      Any ideas?
    • By humanafterall
      I'm using some Custom fields for images: 

      When I save the page, and return the fields are blank. When I re-add the text to the fields and save again then the fields save as expected.

      I know this is stated as being quite experimental but it's super useful feature I'd love to get working correctly.
      I have fields that are CKEditor fields but have overidden this on the image specific template. I've also tried it with regular text fields and I get the same bug.
      (currently using Processwire 3.0.155)
      I've found this issue is specific to editing on pages using the PageTable fieldtype. The fields are not saving when I save the page in the PageTable.
  • Create New...