Rider keeps dimmensions (width and height) of an old copy of an image

Hi, I am working on a website project (as a front-end designer) in Rider. Everytime I want to replace an image (the image has the same name but for example different dimmensions), Rider keeps the dimmensions of an old (obsolete) copy of that particular image. It is frustrating. Only what can help is to rename image outside the Rider and then copy renamed image back into the Rider. Obviously, I have to change the path in the source code as well. But this is no solution for us.

Please help me how should I replace an image in a project without having to renaming every new copy of it. What am I doing wrong? Should I rebuild a solution?

 

Thanks in advance. 

0
5 comments

Hi Bretislav,

Unfortunately, I didn't manage to reproduce your issue. What I did:

1. Add an image to my project with `Add -> Add existing item`

2. Double-click on the image in Rider's solution explorer to open Rider's image viewer

3. Edit image dimensions somewhere outside of Rider or replace the image outside of Rider with the image with another dimensions and the same name

Result:

I can see the updated image immediately in Rider's image viewer when I focus Rider app

 

Could you please provide your steps to reproduce, or, ideally, a screencast?

0
Avatar
Permanently deleted user

Dear Julia,

thanks for answer.

Try to add any graphics you use in the project via Rider UI only. I found out that replacing image outside Rider solves the problem. But. It would be great if it work work within Rider's UI.

Follow my steps and please let me know whether you were able to reproduce the issue.

1. Grab any image u want to use in the project.

2. Press CTRL+C (to copy the image to the clipboard)

3. Navigate (switch) to Rider

4. In Solution explorer, press CTRL+V over/in desired folder to paste the image from the clipboard

5. I work with cshtml files - link pasted image in a source code

6. Now, edit the source image (original-one) you still have somewhere else (e.g. on the Windows desktop) in any image editor. 

7. Save edited image with the SAME NAME (that is important!), reason for this is obvious - you don't want to break the image link in a code.

8.  Press CTRL+C (to copy edited image to the clipboard)

9. Navigate (switch) to Rider

10. In Solution explorer, overwrite the original image with the new-one by pressing CTRL+V, press OK when you are prompted to overwrite the image. 

11. Double-click on the image in Rider's solution explorer to open Rider's image viewer and write me what you see? Rider show ONLY original image, not new(edited)-one.

The same behaviour is when you try Run the project  (CTRL+F5), the Rider loads an original (old-one) image/images. Replacing images outside the Rider solves this issue, but It would be great if Rider could handle this.

 

 

 

 

 

 

1

Dear Bretislav,

Thanks a lot for the detailed steps. I reproduced the bug on my machine and created an issue for the responsible developer: https://youtrack.jetbrains.com/issue/RIDER-44561. Please watch it for updates and feel free to add a comment and a vote.

0
Avatar
Permanently deleted user

Dear Julia,

thank you! I've alway thaught that it is a bug. Keep up good work!

 

0

Thank you, Bretislav!

0

Please sign in to leave a comment.