Can I reload images?

3 years 6 months ago #100363 by billollib
billollib created the topic: Can I reload images?
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?


Please Log in to join the conversation.

3 years 6 months ago #100385 by tpartner
tpartner replied the topic: Can I reload images?
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.

Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: billollib

Please Log in to join the conversation.

3 years 6 months ago #100612 by billollib
billollib replied the topic: Can I reload images?
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?"

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now