status code 302 when fetching images - photo-gallery

I've made a simple html website with bxslider component for a gallery but the images from it keep giving me a 302 response. they are camera pictures. thing is that i have other images that are not on the bxslider and not camera pictures and they load fine. when i put one of those in the gallery, they load fine too. when i open the html file, the images load fine too. im using filezilla to upload the website and im absolutely sure the links are right and the images are there. the images are 1000x750px and weigh about 300kb. also, when i try to load them outside the bxslider, they dont load too. i tried making the images incredibly smaller like 10x7px and still the same error. a friend said it was something about the color pallet or whatever and i changed it to rgb on photoshop though i may not have done it correctly, if you try to check it, the image is sam_8140.jpg. the website is: http://mheuter.besaba.com/
i wont show any code as its only html and it can be viewed in the website.

302 status is used for a redirect. Your requests are redirecting to a page with next content: The document has moved here.; hard to say why. Probably some handler or configuration of web server do this.
I think you should check it with your hosting provider maybe this issue is on their side.

Related

Images tags not showing in wicked_pdf gem

I have a rails app, in which i store some images in AWS, and show them in a PDF report. When there is no images to be shown, i show a placeholder, like this one here: .
The problem is: the image is not show in the PDF file. When in debug mode, the image is shown as usual, but never in my PDF! The link to the image is like this: https://dl.dropboxusercontent.com/u/4096865/missing.png
Edit 1:
I tried to include the image like this: image_tag("https://dl.dropboxusercontent.com/u/4096865/missing.png")
The solution i've found was simple, but prevented me from using dropbox for storage: it must be a http url. So, when i uploaded it to AWS S3, it worked!
So, this here works perfectly: image_tag("http://s3-sa-east-1.amazonaws.com/base-fisc-prod/missing.png")
This is an issue with images stored in a HTTPS link, the easiest way to solve this is to store the images in a HTTP link.
If you must store them in HTTPS, use this solution provided here

Imagemagick integrated with Meteor

I am attempting to use Imagemagick to manipulate images that are uploaded by a user. Right now I have a simple set of Imagemagick.convert[ ] commands server side that preform a variety of tasks on the uploaded image. My problem comes from Imagemagick needing the file data to be read into meteor and not from a url. What I end up doing is writing the uploaded file to the /public folder where Imagemagick is able to manipulate the image. However because the list of Imagemagick.convert commands (saving and writing to /public), the application keeps refreshing, breaking up the processes and sending it into an infinite refreshing cycle. I don't think assets is a viable solution, but I need some folder that I can write to in meteor that will not interrupt the various Imagemagick processes through a refresh. I have tried the .folder for a hidden folder, but meteor gives me an error: "You can’t use a name that begins with a dot “.”, because these names are reserved for the system. Please choose another name." Any thoughts?
#Nate I wrote a little example app that solves this problem by using a temporary directory (as others have suggested):
https://github.com/ideaq/image-uploads
My solution gives you:
Easy image uploading in any Meteor app
Images are re-sized to Thumbnail, Mobile Optimised and Full-size Original
Images are uploaded to AWS S3 for CDN delivery (scalability and speed)
A thumbnail of the image is displayed on to the user without refreshing the page
if you found a better way of doing image uploads in meteor, please share! thanks. :-)

Opening a TIFF File from the Web Browser

I checked previous questions here on SO but I think I want my functionality to work a little different. I understand that .tif files are not natively supported in Internet Explorer and that an extension, such as AlternaTIFF, are available to remedy this. However, I would like the dialog to show up where the user can either save/open the file on the client side. I know that MS Windows Picture and Fax Viewer can open them, no problems.
The files are located on our servers and this will be an intranet site. Currently, I have a link to the files populate in the view but again, I'd like that option for the user to Save/Open the file.
I'm using MVC, which I'm a little unfamiliar with, and can't seem to figure this one out. Thank you.
You can do an action that returns a tiff by changing the headers so when someone clicks the link the file will get downloaded or using FileResult.
Example with FileResult (i find it easier): http://www.dotnetcurry.com/ShowArticle.aspx?ID=807
For saving them is just like uploading any file with MVC. This post can be useful http://haacked.com/archive/2010/07/16/uploading-files-with-aspnetmvc.aspx
My advice is that you convert them to .jpg or .png when uploaded using GDI+.
//You first upload the tiff to the server like the post above explains
//And then open and convert it to .JPEG
Bitmap bm = Bitmap.FromFile("mypic.tiff");
bm.Save("mypic.jpg",ImageFormat.JPEG);
And if you already have the urls of all the tiffs, you can always do a console app to convert all of them. Even if you need to use tiffs its a good idea to have .jpg versions to show on the web. You can even resize them to create previews and save some bandwith too! :-)

Image in rails asset pipeline loading indefinitely, but still appearing

Okay so basically, I have a file in my asset pipeline (http://myapp.dev/assets/avatars/default-avatar.jpg). When I visit the URL, the image loads, but continues to act as though it's transferring data (the chrome spinner is spinning). If I access the same file in production instead of development, it works just fine. In addition, no other files have this issue, it's only that ONE jpeg in that ONE folder.
I have no clue what this could be. Can anyone help?
EDIT: This is what the network activity looks like
I had the same issue (the image would show up but continue to load for a long period of time, then the transfer would ultimately fail and the image would appear broken).
Saving the image again in Photoshop resolved it for me, as you mentioned in your comment above. Must have been something wrong with the image encoding.

image_tag often causes images to not load

I just started using the asset pipeline correctly in rails 3, and am using the image_tag helper instead of just hard-coding <img>'s. At almost every page load, many of the images in the layout don't load. If I refresh a couple times, they will load, but the result is that most of the time the page is a jumbled mess. Has anyone had any experience with this, and how do I make it stop?
The image_tag per se doesn't do anything other than generate the <img> tag for you with the right path etc. If you view the source code that is served up to the browser there shouldn't be anything significantly different between your image tags, whether they've been hard-coded or not.
When you get a page that is a jumbled mess, view source and copy the path to one of the broken images. Construct that url fully and put it into your browser to see if you can retrieve just the image using the path given in the html image tag. If image retrieval is patchy then it is something to do with how your assets are being served, not the rails image_tag helper.
Also look at whether there is any caching going on - perhaps some images were cached before they were properly saved and the browser has cached the fact there is a 'missing image' and future requests for that image are being broken. Does hard-refreshing the page help to load the broken images?

Resources