![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
angular-retina
Advanced tools
Replace AngularJS directive 'ng-src' by a version which supports Retina displays
Replaces the AngularJS directive ng-src
by a version which supports Retina displays.
If the browser runs on a Retina display and the referenced image is available in double resolution, then load the high resolution version of that image from the server.
npm install angular-retina
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js"></script>
<script src="/path/to/your/javascript-files/angular-retina.min.js"></script>
Please note, that angular-retina requires angularjs-1.1.3
or later.
angular.module('MyAwesomeModule', [...other dependencies..., 'ngRetina']);
<img ng-src="/path/to/image.png" width="100" height="100">
<img ng-src="{{image_url}}" width="100" height="100">
Just use it in your HTML-code as you would use the common AngularJS directive ngSrc:
Applications supporting Retina displays should include two separate files for each image resource. One file provides a standard-resolution version of a given image, and the second provides a high-resolution version of the same image. The naming conventions for each pair of image files is as follows:
<image_name>.<filename_extension>
<image_name>@2x.<filename_extension>
If the browser runs on a high-resolution display, and if the referenced image
is available in high-resolution, the corresponding <img ng-src="...">
tag
is interpreted, such that the image in high-resolution is referenced.
This module can also be used to reference static image urls, to load the high resolution version on Retina displays.
Note that when using this module, adding the element attributes width="..."
and/or height="..."
becomes mandatory, as the displayed image
otherwise gets scaled to its double size.
0.1.0 - initial revision 0.1.3 - fixed problems with minified JS code 0.2.0 - using sessionStorage instead of $cacheFactory to boost performance
Copyright (c) 2013 Jacob Rief
Licensed under the MIT license.
FAQs
Replace AngularJS directive 'ng-src' by a version which supports Retina displays
The npm package angular-retina receives a total of 198 weekly downloads. As such, angular-retina popularity was classified as not popular.
We found that angular-retina demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.