Page 1 of 1
Images visible only after page refresh.
Posted: 2013-06-09T10:55:15-07:00
by TriumphEnt
Hello,
I use ImageMagick on a Drupal 7 platform. The version is 6.6.3-4 with OpenMP.
After uploading an image, it does not show immediately. I have to refresh the page for the picture to show. Even if the picture has been uploaded a while ago I need to refresh the page I landed on to see the pic. Now, there is some scaling involved with those pics.
Any idea why it is doing this? What should I do so that the pic displays immediately after it's been uploaded?
Any and all help regarding this is greatly appreciated.
Thank you.
Re: Images visible only after page refresh.
Posted: 2013-06-09T11:01:57-07:00
by fmw42
Sorry, but I do not think this is an Imagemagick issue, but one for your interface software to refresh the browser. I don't even think Imagemagick is involved in uploading images, only processing them after uploading. Perhaps post to the Drupal forums.
Re: Images visible only after page refresh.
Posted: 2013-06-09T11:33:40-07:00
by magick
Are you talking about refreshing the page with the 'display' program?
Re: Images visible only after page refresh.
Posted: 2013-06-09T12:28:35-07:00
by Bonzo
If your new picture has the same name as an old picture the old picture will probable be in the cache and that is why you need to refresh.
You will need to give the picture a new name or change the website so the jpg images or whatever are not cached.
Re: Images visible only after page refresh.
Posted: 2013-06-09T18:02:20-07:00
by TriumphEnt
I am talking about refreshing the browser's page.
Re: Images visible only after page refresh.
Posted: 2013-06-09T18:05:41-07:00
by TriumphEnt
It's on a development site for numerous users. The odds that two images will have the same name are slim. It could happen however.
This still being a development site, I am the only one uploading images (for testing.) None of the images I have uploaded have the same name.
Re: Images visible only after page refresh.
Posted: 2013-06-09T18:35:32-07:00
by fmw42
TriumphEnt wrote:I am talking about refreshing the browser's page.
I don't think that is an IM problem, but one for your drupal/PHP software to issue a refresh page to the browser (as user Bonzo indicated). It is the page that needs refreshing and not the image. The page is probably the same named page and so the browser may have it cached.
What browser are you using? Have you tried other browsers? Have you told the browsers to turn off the cache?
Re: Images visible only after page refresh.
Posted: 2013-06-09T20:29:59-07:00
by TriumphEnt
ok, thanks. I will look into the issue with other browsers and the cache. I was just under the impression that the image was not immediately scaled after uploading and that it needed to be called for the scaling to begin. But I guess I must be wrong.
Thank you all for your help and good advice.
Re: Images visible only after page refresh.
Posted: 2013-06-09T20:32:26-07:00
by TriumphEnt
Btw, that was Firefox.
Re: Images visible only after page refresh.
Posted: 2013-06-09T21:12:55-07:00
by fmw42
TriumphEnt wrote:ok, thanks. I will look into the issue with other browsers and the cache. I was just under the impression that the image was not immediately scaled after uploading and that it needed to be called for the scaling to begin. But I guess I must be wrong.
Thank you all for your help and good advice.
What do you mean by scaled? Perhaps you should explain the steps the are done when an image is uploaded? What processing is done? How is it then returned for viewing to the browser? Depending upon how your PHP page is set up, the browser may be tasked to scale the image if the size in the <img ...> tag is not the same as the actual image size. That would not have anything to do with Imagemagick. On the other hand, if Imagemagick is being called to scale the image before it is returned for viewing, that is another story. Nevertheless, I don't see how that would affect the refresh of the image. I think you need to understand how IM is being used and how your system is returning the image for display by the browser.
Re: Images visible only after page refresh.
Posted: 2013-06-09T21:42:36-07:00
by TriumphEnt
fmw42 wrote:TriumphEnt wrote:ok, thanks. I will look into the issue with other browsers and the cache. I was just under the impression that the image was not immediately scaled after uploading and that it needed to be called for the scaling to begin. But I guess I must be wrong.
Thank you all for your help and good advice.
What do you mean by scaled? Perhaps you should explain the steps the are done when an image is uploaded? What processing is done? How is it then returned for viewing to the browser? Depending upon how your PHP page is set up, the browser may be tasked to scale the image if the size in the <img ...> tag is not the same as the actual image size. That would not have anything to do with Imagemagick. On the other hand, if Imagemagick is being called to scale the image before it is returned for viewing, that is another story. Nevertheless, I don't see how that would affect the refresh of the image. I think you need to understand how IM is being used and how your system is returning the image for display by the browser.
yes, ImageMagick does the scaling. It follows parameters given by several image styles (such as size, etc.) then returns the finished products that are saved in separate directories (one for each size) ready for display by the browser.
Re: Images visible only after page refresh.
Posted: 2013-06-09T22:58:36-07:00
by fmw42
yes, ImageMagick does the scaling. It follows parameters given by several image styles (such as size, etc.) then returns the finished products that are saved in separate directories (one for each size) ready for display by the browser.
But IM does not download the image to the browser. That is done by PHP with an HTML img tag. So the page containing the image will need to be refreshed. It is not Imagemagick's problem, but that of the PHP/drupal that is sending the image to the browser via the HTML page that contains the image. Imagemagick just rescales and puts the result in some directory from which PHP or some other mechanism sends the some page with the image to the browser.