Images visible only after page refresh.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Images visible only after page refresh.

Post 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.

:D
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Images visible only after page refresh.

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Images visible only after page refresh.

Post by magick »

Are you talking about refreshing the page with the 'display' program?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Images visible only after page refresh.

Post 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.
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Images visible only after page refresh.

Post by TriumphEnt »

I am talking about refreshing the browser's page. :)
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Images visible only after page refresh.

Post 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. :)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Images visible only after page refresh.

Post 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?
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Images visible only after page refresh.

Post 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. :)
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Images visible only after page refresh.

Post by TriumphEnt »

Btw, that was Firefox. :)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Images visible only after page refresh.

Post 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.
TriumphEnt
Posts: 12
Joined: 2013-04-25T06:36:58-07:00
Authentication code: 6789

Re: Images visible only after page refresh.

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Images visible only after page refresh.

Post 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.
Post Reply