Forum for discussing general topics related to Couch.
8 posts Page 1 of 1
deleted
Hi,
Can I make multiple thumbnail sizes from an uploaded image ..

Sure. You can attach as many editable regions of type 'thumbnail' with the original image as you like or, alternatively, use the cms:thumbnail tag

.. and delete the original?

This is not possible out-of-the box, I am afraid, but really shouldn't matter as you can simply skip publishing the main image's URL anywhere.

.. it requires different image sizes with _m,_x,_n appended

i.e. the thumbnails follow a particular naming convention dependent on their sizes. Right?
It is here that the Couch thumbnails, created using the two methods above, won't fit the bill.
While creating a thumbnail, Couch appends its dimensions to image's name.
So, for example, the main image's name is 'my_image.jpg' and the thumbnail region's dimensions are 150 x 100, the name would be 'my_image-150x100.jpg'.

However, since the naming convention is fixed and known, I think one solution to your problem could be using .htaccess rewrite rules.
We can create a simple set of rules that converts between Couch's naming convention and the convention your JQuery module expects.

Let me know if this sounds feasible to you.

Thanks.
From looking at your code, it appears as though the naming convention can be readily modified and thus would be the easiest route to take:
Code: Select all
$(".gallery").justifiedGallery({
   'sizeSuffixes':{
      'lt320':'_n',
      'lt500':'_x',
      'lt640':'_z',
      'lt1024':'_b'
   },
   'usedSuffix':'lt500',
   'justifyLastRow':false,
   'rowHeight':300,
   'fixedHeight':false,
   'lightbox':true,
   'captions':false,
   'margins':7,
   'extension':'.jpg'
});
I don't necessarily understand what the desired dimensions are, so you would need to change this:
Code: Select all
$(".gallery").justifiedGallery({
   'sizeSuffixes':{
      'lt320':'-320x300',
      'lt500':'-500x300',
      'lt640':'-640x300',
      'lt1024':'-1024x300'
   },
   'usedSuffix':'lt500',
   'justifyLastRow':false,
   'rowHeight':300,
   'fixedHeight':false,
   'lightbox':true,
   'captions':false,
   'margins':7,
   'extension':'.jpg'
});
I think @cheesypoof's solution would be the most elegant way of handling the problem :)
deleted
deleted
This is a response to a post that was deleted by you regarding modifying the 2MB limit of uploaded photos in gallery -

I wouldn't advice changing the limit as it could lead to getting 'Out of memory' errors, white screen etc. depending on your server's configuration.

But if you must do it, following are the two places where the changes must be made -
couch\includes\plupload\upload.php - find and change the following line:
max_file_size : '2mb',

couch\includes\timthumb.php - find the following line and set the limit to something higher, say 128M
ini_set('memory_limit', "50M");
deleted
8 posts Page 1 of 1