The image looks great when viewed on the browser, but for some reason it's not displaying properly on

My local image displays perfectly on the browser, but doesn't show up on my android device. Here's the code:

<center><img class="image-full" width="200" src="../img/logo.png"></center>

The image appears fine on my computer, but is not found on my android device.

However, if I change the image source to an online link like this (for example) "", then it shows up correctly on both the browser and mobile.

Why does this happen?

Here are the links to index.html, login.html, and app.js for reference:

index.html : http://pastebin.com/GEjS7Q54

login.html : http://pastebin.com/k5GXxfLS

app.js : http://pastebin.com/nLz6UFmD

Answer №1

Consider attempting to use the file path without ../

Alteration:

src="../img/logo.png"

To achieve this:

src="img/logo.png"

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Does AngularJS have a hook for pre or post $apply functionality?

I am looking to execute a callback function every time the $apply method is invoked on a scope. Are there any pre/post hooks for $apply or events that I can listen for in order to accomplish this? ...

Verify whether the included file is being utilized by ajax or php

I have developed a unique system in which PHP or AJAX is used to build the HTML dynamically. Since the structure of the generated HTML remains consistent, I decided to create an include file that can be accessed by both PHP and JavaScript functions. My que ...

Angular 6 encounters issues when making Http requests with authorization headers

Currently, I am in the process of deploying an application developed using Angular 6 that interacts with a Tomcat server on localhost. Everything runs smoothly until I introduce a header field into my HTTP request. this.http .post<LoginResult> ...

Using Vue to alter data through mutations

Greetings! I am currently in the process of developing a website for storing recipes, but as this is my first project, I am facing a challenge with modifying user input data. My goal is to create a system where each new recipe added by a user generates a u ...

Utilizing getter and setter functions within a setter with a type guard

I need to implement a getter and setter in my class. The setter should accept a querySelector, while the getter is expected to return a new type called pageSections. The challenge I'm facing is that both the getter and setter must have the same argum ...

When attempting to import and utilize global state in a component, the error message "Cannot iterate over null object"

I am in the process of setting up a global state to keep track of various properties that I need to pass down to multiple components. const initialState = { username: '', selectedCategory: null, categoriesList: [], createdTaskTopi ...

How to make a div slide up using jQuery without obstructing text

A scenario is presented where HTML contains two div elements, one with text and the other hidden initially. The goal is to make the second div slide up from below the first div to create a new background color effect. While sliding up works successfully, ...

What is the process for verifying the ongoing sessions within a particular set of classes?

I have a list of 10 items with varying active classes based on user interactions. I need to determine the number of sets of 3 consecutive active classes within the list. In the given example, there are 2 sets of 3 consecutive active classes: 4,5,6 and 8,9, ...

Is there a way to limit user input on an editable material-table to prevent the entry of characters, special characters, or negative numbers?

I am currently working with an editable material-table, and I would like to restrict the user from entering anything other than numbers in one of the columns. Unfortunately, I couldn't find any information about this in the validation section on the m ...

javascript navigation bar (with nested `<li>` elements containing additional `<ul>` elements)

I have successfully implemented a dynamic side category menu. $(document).ready(function () { $(' #cate_id2 > ul > #subcate_id4 > ul').hide(); $(' #cate_id2 > ul > #subcate_id4 ').hover(function ...

Can we generate simplified Typescript types in the compiled distribution of a Node package?

My goal is to streamline the output in the TypeScript declaration files (*.d.ts) that come with the bundled version of my module's code. This involves a process that includes the TypeScript compiler, Babel, and Rollup. I'm also utilizing Relay an ...

Angular/Ionic - How can I prevent my function from being called repeatedly while typing in an input field?

I am currently in the process of self-teaching how to construct an Angular/Ionic application. To store JSON, I am utilizing Backand and aiming to retrieve a random JSON value each time the page is refreshed. An issue I am facing is that the random call fu ...

Using Regex to apply specific conditions

I've been working on a directive that handles the ng model for two fields - mobile code and mobile number. In my implementation, I'm combining the ngmodels and utilizing REGEX. The requirements are as follows: - If the mobile code is 015x, the ...

What causes the discrepancy in results between Javascript sha1 and PHP5 sha1 when generating hashes for utf-8 strings?

I'm facing an issue with utf-8 characters in a string. The PHP sha1 and Javascript sha1 are generating different codes for the same string "abc艾". Can anyone assist me with this? Thank you in advance. PHP code: $str = "abc艾"; $result = sha1($st ...

JavaScript - Issue with For Loop when Finding Symmetric Difference

Here is my solution to a coding challenge on FreeCodeCamp called "Symmetric Difference." I'm puzzled as to why my code is returning 2, 3, 4, 6 instead of the expected 2, 3, 4, 6, 7. function sym(args) { args = Array.from(arguments); var new ...

Having trouble with Isotope masonry functionality

While experimenting with Isotope from , I tested the reLayout method using the provided example found at . I copied the css and js to my page () but encountered an issue where clicking on the first element caused all other elements to move to the first col ...

Extracting values from a JSON object in JavaScript

Is there a way to retrieve the _id and state values from the provided data? Check out the data { "data": { "totalSamplesTested": "578841", "totalConfirmedCases": 61307, "totalActiveC ...

Use Express 4.x to automatically redirect HTTP traffic to HTTPS

Here is the code snippet that I am working with: var https = require('https'); var http = require('http'); var express = require('express'); var app = express(); var router = express.Router() ...

What could be causing the `unstable_Profiler` to not function properly in production mode?

Encountering a problem with unstable_Profiler in my React-Native project where the onRender callback is being ignored, but only in production mode. No errors are being thrown and everything renders correctly. I followed the advice from this article: I tes ...

Exploring the Differences Between Abstract Classes, Singletons, and Public-statics in Typescript

Recently, I made the transition from coding Javascript in a functional style to using Typescript with classes for my work projects. There have been instances where I needed to ensure that there was only one instance or location for particular functionality ...