- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Can I reload images?
- billollib
- Topic Author
- Offline
- New Member
Less
More
10 years 5 months ago #100363
by billollib
Can I reload images? was created by billollib
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
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 topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
10 years 5 months ago #100385
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on 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.
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.
The following user(s) said Thank You: billollib
The topic has been locked.
- billollib
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
10 years 5 months ago #100612
by billollib
Replied by billollib on 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?"
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 topic has been locked.