Welcome to Geeklog, Anonymous Monday, December 30 2024 @ 02:54 pm EST

Geeklog Forums

post-upgrade story-image resize


Status: offline

ajzz

Forum User
Regular Poster
Registered: 01/19/05
Posts: 113
I recently upgraded a site and reduced the story-image thumbnail size during the upgrade. As a result of this, the newly uploaded stories show image thumbnails with with the altered size (i.e. mogrify is working fine), however, the old stories still show their images at the old thumbnail size.

How do i convert some (or all) old stories to show images with the new thumbnail size? (Just opening for edit and saving does not work.)

Any ideas short of manual geometry mogrification?

Thanks, Ajay

edit: is this unexpected behavior?
 Quote

Status: offline

ajzz

Forum User
Regular Poster
Registered: 01/19/05
Posts: 113
Someone?

Do stories store the thumbnail size? Can i just batch-resize the thumbs without having to worry?

Thanks,

Ajay
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
If you have a look at the source of your website you can see that the image/thumbnail dimensions are saved in the story.

I think that you have to do two actions:
1) Resize the images, there is plenty software for that, so that's not the main problem.

2) Adjust the image dimensions in the database.
I guess you will have to find a way to change these by downloading the database as a CSV file, change the dimensions with a program like Ultra Edit (with a nice macro option) and upload it again with PHPMyAdmin. You can edit them in PHPMyAdmin as well if there are not too much.

But I don't know what happens with portrait/landscape images, and with images with different proportions...


BTW this behaviour is normal, the resizing is done when making the story and uploading the image, and not when displaying the story.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

Status: offline

ajzz

Forum User
Regular Poster
Registered: 01/19/05
Posts: 113
Thanks for the insights beewee.

I took the liberty to look through the code of public_html/admin/story.php and a few rows of the gl_stories table and it seems that, as you said, the images and links are created by story.php but stored in the story text instead of a different table.

The long shot is that I may have to redo the thumbnails as you say and manually replace the image_dimensions in the relevant story text in each article in gl_stories. It would have made life so much easier if thumbnail data was also stored in the table gl_article_images.

Unfortunately it is going to need more than a simple scaling of dimensions in my case. The new thumbnail size does not scale symmetrically with the old one. Perhaps i will take the cowardly way out by re-setting the new thumbnail dimensions to change by the same factor in both height and width. That said, I am wondering if its just faster to just delete and re-upload the images manually into these articles Confused .

Arrow Developers, are database entries for article thumbnails/dims and a "redo article thumbnails" script (on the lines of a similar feature in Gallery) worthy of a feature request Question

Thanks,

Ajay
 Quote

Status: offline

beewee

Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
The new thumbnail size does not scale symmetrically with the old one.


That will make the batch resizing of the images a bit tricky !
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
 Quote

All times are EST. The time is now 02:54 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content