Welcome, Guest
Username: Password: Remember me

TOPIC: Can I reload images?

Can I reload images? 6 months 2 weeks ago #100363

  • billollib
  • billollib's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
Newbie help question again. Sorry.

Configuration: Limesurvey Version 2.00+ Build 130913, Server is a virtual computer running CentOS 6.4, apache, sendmail, etc.

I have created a survey that is image-intensive. My test users complain that the images load too slowly and are too big. So, I decided to make the images smaller.

I have gone into the uploads/survey/<surveynumber>/images and replaced the image files there with smaller versions (with the same name). However, it hasn't changed the appearance of the survey. I assume that all of the images that are being used are in the myql database somewhere.

Is there a global command to re-read the images/ reconstruct the survey without having to rename each image file and change each question by hand?

Thanks
The administrator has disabled public write access.

Can I reload images? 6 months 2 weeks ago #100385

  • tpartner
  • tpartner's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 3837
  • Thank you received: 687
  • Karma: 329
The images are not in the database, they all reside where you found them - uploads/survey/<surveynumber>/images.

I suspect it may be a caching issue.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.
The following user(s) said Thank You: billollib

Can I reload images? 6 months 1 week ago #100612

  • billollib
  • billollib's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
You are right in that the survey loads the images from the upload directory and doesn't store things as blobs in mysql.

I found the problem. When I added the images to the survey, the html that was generated included the dimensions. Thus, when I resized the images to smaller size, they were reloaded *and then scaled* to the original dimensions -- which, it turned out, slowed down things even more.

I couldn't find an easy way to edit the html of all of the questions in limesurvey itself. I'm doing this over a network connection, and individually loading each question to edit the html is within the limesurvey gui was painful. I can't find something that lets me edit the questions in a grid so I can move quickly from one question to another without the latency of the full gui.

So, my solution was to use phpmyadmin and edit the questions table directly in the mysql database, since it will allow me to do so somewhat more quickly using its table format. I went through each of the 222 (yikes) questions and deleted the "width=nnn height=nnn" codes. The images loaded with their native sizes at that point, and resizing the images has an effect.

This worked OK, though it was a little slow. I guess a followup question would be "Does Limesurvey have an editor that will let you edit these things more quickly without loading each question one by one?"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.093 seconds
Donation Image